Difference between revisions of "Template talk:Subproperty-table"

From Free Software Directory
Jump to: navigation, search
(Created page with "<noinclude> Precondition: Passed the name of a Property page as variable {{{1}}} Postcondition: Prints a multi-column list of URLs; each of which link with the following structu...")
 
 
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
Precondition: Passed the name of a Property page as variable {{{1}}}
 
Precondition: Passed the name of a Property page as variable {{{1}}}
 +
 
Postcondition: Prints a multi-column list of URLs;  each of which link with the following structure ''Category/{{{1}}}/property-value'', where property-value is one of the Allowed-values of the page Property:{{{1}}}
 
Postcondition: Prints a multi-column list of URLs;  each of which link with the following structure ''Category/{{{1}}}/property-value'', where property-value is one of the Allowed-values of the page Property:{{{1}}}
 
</noinclude>
 
</noinclude>
Line 13: Line 14:
 
<DIV style="column-count:3;-moz-column-count:3;-webkit-column-count:3;margin:2px 2px 2px 2px;"><nowiki/>
 
<DIV style="column-count:3;-moz-column-count:3;-webkit-column-count:3;margin:2px 2px 2px 2px;"><nowiki/>
 
   {{#arraydefine:@allowedvalues|{{#ask: [[:Property:{{{1}}}]] |?Allows value= |sep=,}} }}
 
   {{#arraydefine:@allowedvalues|{{#ask: [[:Property:{{{1}}}]] |?Allows value= |sep=,}} }}
 +
  {{#arraysort:@allowedvalues|desc}}
  
## call sortarray on @allowedvalues
 
## call printarray on sorted @allowed values using arraymap below as your example
 
 
   <UL style="list-style: none !important;">
 
   <UL style="list-style: none !important;">
     {{#arraymap:{{{2}}}|,|xvarx|<li>[[category/{{{1}}}/xvarx|xvarx]]</li>|\n}}
+
     {{#arrayprint:@allowedvalues|,|xvarx|<li>[[category/{{{1}}}/xvarx|xvarx]]</li>}}
 
   </ul>
 
   </ul>
  

Latest revision as of 13:06, 26 October 2011

Precondition: Passed the name of a Property page as variable {{{1}}}

Postcondition: Prints a multi-column list of URLs; each of which link with the following structure Category/{{{1}}}/property-value, where property-value is one of the Allowed-values of the page Property:{{{1}}}





Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.

The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.