Welcome to Dream.In.Code
Become an Expert!

Join 149,506 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,328 people online right now. Registration is fast and FREE... Join Now!




Templates

 
Reply to this topicStart new topic

Templates, Recursion problem

grinsalot
18 Jul, 2007 - 04:31 PM
Post #1

D.I.C Head
**

Joined: 8 Apr, 2006
Posts: 50


My Contributions
Hi,

I am learning to use divs, style sheets etc. in order to build a wiki. I have a basic understanding of how to code the templates, but I have encountered a recurring problem. I don't undersand, or even know, if it is possible to recursively call a template in order to build a consecutive numbered list. In other words, I'd like visitors of my wiki to be able to add their own thoughts, and use my templates where applicable.

The template I have created builds a new list with each call. I'd like each call to simply join to the existing list. Is that possible?

Thank you in advance for any help.

Template:List
CODE
#{{{Description}}}


Template Call
CODE
{{List|Description=}}






User is offlineProfile CardPM
+Quote Post

serializer
RE: Templates
20 Jul, 2007 - 10:49 AM
Post #2

D.I.C Head
**

Joined: 25 Jun, 2007
Posts: 108


My Contributions
I'd need to see more information to help. I'm guessing these templates are specific to the wiki you're using. What system is it? This is more a server-side question than HTML/CSS.

--serializer
User is offlineProfile CardPM
+Quote Post

grinsalot
RE: Templates
21 Jul, 2007 - 04:06 AM
Post #3

D.I.C Head
**

Joined: 8 Apr, 2006
Posts: 50


My Contributions
QUOTE(serializer @ 20 Jul, 2007 - 11:49 AM) *

I'd need to see more information to help. I'm guessing these templates are specific to the wiki you're using. What system is it? This is more a server-side question than HTML/CSS.

--serializer

Hi Serializer,

Thank you for your post. No servers are involved. I've downloaded the XP version of Mediawiki to my personal PC.

Regards,
grinsalot
User is offlineProfile CardPM
+Quote Post

serializer
RE: Templates
21 Jul, 2007 - 04:25 AM
Post #4

D.I.C Head
**

Joined: 25 Jun, 2007
Posts: 108


My Contributions
From the Mediawiki download page (http://www.mediawiki.org/wiki/Download):

QUOTE

[b]MediaWiki is server software. [b]


It's actually written in PHP, so any code to do with template generation will have to be written in that language, which is nothing to do with divs or stylesheets (which are just to do with the appearance of the page when it finally gets drawn by the browser).

This topic should be moved to PHP forum?

When you say "The template I have created builds a new list with each call" how does it build this list, and can you post the code?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 07:03PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month