Forum:How to make template with customizable fields?

From Uncyclopedia, the content-free encyclopedia

Revision as of 03:46, January 4, 2007 by 66.102.74.160 (talk)

Jump to: navigation, search
Forums: Index > Village Dump > How to make template with customizable fields?
Note: This topic has been unedited for 2797 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Having said loudly that I hate haet hat templates I now want to make one...ain't that just the way it goes? Anyway, I want an "travel advertisement" that can be stuck on some of the many "I hate my hometown it's so dull and boring" articles. It needs to have customizable fields: the name of the hometown or region, two notable features, and an image. Here's teh codez so far:

{| style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; padding: 2px; background: #FFFFC0; margin 1px 1px; width: 400px; height: 100px; line-height:1.25em;" | style="white-space: wrap; text-align: left; font-size=10pt;" | '''Come visit beautiful {{{place_name}}} today.'''<br>Here we have the {{{notable_thing1}}} in the world. And also {{{notable_thing2}}}! So book a tour today, and don't forget your Uncyc VISA. | style="padding-left: 1px" | {{{image_link}}} | |}

The rough draft currently looks like:

Come visit beautiful {{{place_name}}} today.
Here we have the {{{notable_thing1}}} in the world. And also {{{notable_thing2}}}! So book a tour today, and don't forget your Uncyc VISA.
{{{image_link}}}

(It will probably change to become more prettier.)

But at least in my userspace (http://uncyclopedia.org/wiki/User:One-eyed_Jack/TravelTemplate) the customizable fields don't work. How does I makes them work? Please remember that I am a stupid stupid fellow, and this is only my second attempt at a template. ----OEJ 03:37, 2 January 2007 (UTC)


Because you've named your fields, you have to refer to them that way when you declare the template. For example: {{User:One-eyed_Jack/TravelTemplate|place_name=Bulgaria|notable_thing1=tallest dwarfs|notablething2=shortest giants|image_link=[[Image:rainbow.jpg]]}}

If you don't want to have to do this, use numbered values instead ({{{1}}}, {{{2}}}, etc). --Algorithm 05:38, 2 January 2007 (UTC)

Thanks -- I'll work on it a bit when I have some time. ----OEJ 02:28, 4 January 2007 (UTC)
Personal tools
projects