Difference between revisions of "Talk:Manual"

From FollowTheScore
Jump to: navigation, search
(New page: From the manual: * To include variables which are used in a '''template call''', specify the original template name within single curly braces and add a suffix; the template name ''includ...)
 
Line 9: Line 9:
  
 
That does not seem to work. What ''is'' meant? Can an example be given?--[[User:Patrick|Patrick]] 17:09, 17 February 2007 (CET)
 
That does not seem to work. What ''is'' meant? Can an example be given?--[[User:Patrick|Patrick]] 17:09, 17 February 2007 (CET)
 +
 +
::Your interpretation is exactly right. The template call to "B" is replaced by a call to "BD" with the same arguments, and you will get the result of the expansion of BD being called with the original parameters. Have a look at [[Example 2]];
 +
<pre><nowiki>
 +
<DPL>
 +
  category=African Union member states
 +
  includepage={Infobox Country or territory} dpl
 +
  mode=userformat
 +
  addpagecounter=true
 +
  listseparators=\n{|class=sortablewikitable id=123 \n!Country \n!Area \n!Population \n|#hits\n|-,\n|-\n|[[#%PAGE%|%PAGE%]]\n,\n|align=right|%COUNT%\n,\n|}
 +
  secseparators=,\n|,,
 +
</DPL>
 +
</nowiki></pre>
 +
::The Template [[:Template:Infobox Country or territory dpl]] is used to create the entries in the small table. NOtet that the space character between "territory" and "dpl" comes from the way the DPL statement was written and is significant. Maybe someting like "includepage={Infobox Country or territory}.dpl" would have been more instructive.
 +
 +
::Can you please post the code snippet with which you tried? Maybe we can find the error and improve documentation based on the kind of error you made. -- [[User:Gero|Gero]] 20:17, 17 February 2007 (CET)

Revision as of 21:17, 17 February 2007

From the manual:

  • To include variables which are used in a template call, specify the original template name within single curly braces and add a suffix; the template name including the suffix will be called instead of the original template and the result will contain just the output of your alternate template:
includepage = {template1}suffix1,{template1}suffix2,{template2}suffix3,....

Does this mean the following?

If page A is in the resulting set of pages, and A contains a call {{B|C}}, then includepage={B}D produces the result of {{BD|C}}.

That does not seem to work. What is meant? Can an example be given?--Patrick 17:09, 17 February 2007 (CET)

Your interpretation is exactly right. The template call to "B" is replaced by a call to "BD" with the same arguments, and you will get the result of the expansion of BD being called with the original parameters. Have a look at Example 2;
<DPL>
  category=African Union member states
  includepage={Infobox Country or territory} dpl
  mode=userformat
  addpagecounter=true
  listseparators=\n{|class=sortablewikitable id=123 \n!Country \n!Area \n!Population \n|#hits\n|-,\n|-\n|[[#%PAGE%|%PAGE%]]\n,\n|align=right|%COUNT%\n,\n|}
  secseparators=,\n|,,
</DPL>
The Template Template:Infobox Country or territory dpl is used to create the entries in the small table. NOtet that the space character between "territory" and "dpl" comes from the way the DPL statement was written and is significant. Maybe someting like "includepage={Infobox Country or territory}.dpl" would have been more instructive.
Can you please post the code snippet with which you tried? Maybe we can find the error and improve documentation based on the kind of error you made. -- Gero 20:17, 17 February 2007 (CET)