Extension talk:Winter/Documentation/Winter v1
Questions/Comments
editWinter does not honor <nowiki>!
editI tried to copy the language specification to my site for my users, but it turns out that you cannot have the specification on any site that has Winter enabled, because it tries to interpret all the examples!
I tried putting <nowiki> around examples, but Winter merrily went about its business anyway!
It seems that in order to have examples, one needs to slightly pervert the Winter syntax, such as putting a space between the opening curly braces and the octothorpe. But this makes the examples less useful, as users cannot simply copy/paste from the rendered page.
I also tested <noinclude> as a way of turning Winter off, and it doesn't work, either.
So Winter needs a way of getting turned off. Personally, I think it should honor both <nowiki> and <noinclude>.
- You need to use <nowinter> :) --Frantik 05:46, 12 March 2007 (UTC)
Question
editHi. I have problem with Winter. I need to show template parametr hg(here comes Winter variable, eg 1), but {{#function | homegoals || {{#var | {{{hg{{#1}}}}} }} dont works.
- try {{#function | homegoals || {{#var | {{#hg| {{#1}} }} }} }}
- but you're defining a variable inside of a function, so the variable will not be accesable in the general program code, only inside the function --Frantik 14:21, 14 February 2007 (UTC)
Template Variables in a loop
editIs there a way to get the content of a Parameter in a loop like this:
{{#for | {{#setvar a 1}} || {{#a <= 5}} || {{#a ++}} || {{{ {{#a}} }}} }}
the alternative would be
{{{1}}} {{{2}}} {{{3}}} {{{4}}} {{{5}}}
The above example of course does not work, I am looking for a correct syntax to do the job - in this case it would be a dump of the first 5 Parameters given to a template. The intention is to use it in a Template to generate a table with variable parameter count.
- You need to use the escape characters to represent the braces, otherwise they are interpreted as program code
{{#for | {{#setvar a 1}} || {{#a <= 5}} || {{#a ++}} || ^(^(^( {{#a}} ^)^)^) }}