Template:NameSort: Difference between revisions

From Jenny Everywhere Wiki
No edit summary
(I can't believe NameSort has lied to me all these years.)
Line 7: Line 7:
     <!--if there ARE spaces, then find the last word and use the first six digits  
     <!--if there ARE spaces, then find the last word and use the first six digits  
           of it as the sort key -->
           of it as the sort key -->
     |#default ={{#sub:{{{name|{{PAGENAME}}}}}|{{#rpos:{{{name|{{PAGENAME}}}}}| }}|7}},{{#explode:{{{name|{{PAGENAME}}}}}| |0}}
     |#default ={{#sub:{{{name|{{PAGENAME}}}}}|{{#rpos:{{{name|{{PAGENAME}}}}}| }}|7}}, {{#explode:{{{name|{{PAGENAME}}}}}| |0}}
}} <!-- first switch close-->
}} <!-- first switch close-->
   <!-- If there ARE close parentheses, use the word that immediately precedes the  
   <!-- If there ARE close parentheses, use the word that immediately precedes the  
       open parentheses as the sort key -->  
       open parentheses as the sort key -->  
   |#default = {{#explode:{{#sub:{{{name|{{PAGENAME}}}}}|0|{{#expr:{{#rpos:{{{name|{{PAGENAME}}}}}|(}}-1}}}}| |-1}},{{#explode:{{{name|{{PAGENAME}}}}}| |0}} {{#explode:{{{name|{{PAGENAME}}}}}|(|-1}}
   |#default = {{#explode:{{#sub:{{{name|{{PAGENAME}}}}}|0|{{#expr:{{#rpos:{{{name|{{PAGENAME}}}}}|(}}-1}}}}| |-1}}, {{#explode:{{{name|{{PAGENAME}}}}}| |0}} {{#explode:{{{name|{{PAGENAME}}}}}|(|-1}}


}} <!--second switch close-->
}} <!--second switch close-->
}} <!--DEFAULTSORT close--></includeonly><noinclude>[[Category:coding utility templates|NameSort]]{{documentation}}{{lock}}</noinclude>
}} <!--DEFAULTSORT close--></includeonly><noinclude>[[Category:coding utility templates|NameSort]]{{documentation}}{{lock}}</noinclude>

Revision as of 04:05, 25 March 2024

Template:Lock