Difference between revisions of "Template:Lib/data/pairs"

From Issuepedia
Jump to navigation Jump to search
(and again for inside the xploop)
(i can has working code *now*?)
Line 1: Line 1:
<noinclude>[[category:W3TPL]]</noinclude>
+
<func DataHdr>
 +
    <echo>[[category:data.links]]</echo>
 +
    <let keylist />
 +
</func>
 +
 
 
<func DataPair PairName PairVal>
 
<func DataPair PairName PairVal>
 
     <let name="$PairName" copy="PairVal" />
 
     <let name="$PairName" copy="PairVal" />
     <let name="PairNameDisp" copy="PairName" />
+
     <let name="PairList" append>\</let>
    <let name="PairNameDisp" append>.disp</let>
+
     <let name="PairList" append copy="PairName" />
    <let name="$PairNameDisp" copy="PairVal" />
 
     <let name="PairList" append pre>\<get name="PairName" /></let>
 
 
</func>
 
</func>
  
 +
<!-- trace assigns / -->
 
<func DataShow>
 
<func DataShow>
     <xploop list="$Topics" repl=$s$>[[category:$s$]]</xploop>
+
     <xploop list="$PairList" var="key">
    <xploop list="$PairList" repl="$s$"><let name="NameDisp" copy="$s$" /><let name="NameDisp" append>.disp</let>
+
        <let name="valDisp" copy="$key" />
* '''$s$''': <get name="NameDisp" />
+
        <if comp="$key" with="Date">
 +
            <let name="valDisp">[[:category:</let>
 +
            <let name="valDisp" append copy="$key" />
 +
            <let name="valDisp" append>|</let>
 +
            <let name="valDisp" append copy="$key" />
 +
            <let name="valDisp" append>]]</let>
 +
        </if>
 +
<echo>
 +
* '''<get name="key" />''': <get name="valDisp" /></echo>
 
     </xploop>
 
     </xploop>
* '''Topic pages''':<xploop list="$Topics" repl=$s$>&ensp;[[$s$]]</xploop>
 
* '''Topic categories''':<xploop list="$Topics" repl=$s$>&ensp;[[:category:$s$|$s$]]</xploop>
 
</func>
 
 
<func DumpTest>
 
    <dump trace />
 
 
</func>
 
</func>

Revision as of 15:15, 24 August 2008


> function datahdr() <= ()


> function datapair() <= ()


> function datashow() <= ()