User talk:Magnus Manske/Book2scroll
Add topicAppearance
Latest comment: 14 years ago by Alex brollo
Beautiful!
[edit]Beautiful code! I like a lot #titleparts, I use it a lot as "string splitter" too to pass one or multiple values into a single parameter of any template...
But: what if template is used outside Index or Page namespaces?
<includeonly>{{#switch: {{NAMESPACE}} |Index=[[File:Library-logo-blue-outline.png|right|20px|link=http://toolserver.org/~magnus/book2scroll/index.html?file={{{n|{{PAGENAMEE}}}}}&startpage={{{p|1}}}]] |Page=[[File:Library-logo-blue-outline.png|right|20px|link=http://toolserver.org/~magnus/book2scroll/index.html?file={{{n|{{#titleparts:{{PAGENAMEE}}|1|1}}}}}&startpage={{{p|{{#titleparts:{{PAGENAMEE}}|1|2}}}}}]] |[[File:Library-logo-blue-outline.png|right|20px|link=http://toolserver.org/~magnus/book2scroll/index.html?file={{{n}}}&startpage={{{p|1}}}]] }}</includeonly>
(I didn't test it so far..) --Alex brollo (talk) 14:15, 17 August 2010 (UTC)
- This my present tested & running code into it:Template:BackToScroll:
{{#switch: {{NAMESPACE}} |Indice=[[File:Library-logo-blue-outline.png|left|20px|link=http://toolserver.org/~magnus/book2scroll/index.html?lang=it&file={{PAGENAMEE}}&startpage={{{p|1}}}]] |Pagina=[[File:Library-logo-blue-outline.png|left|20px|link=http://toolserver.org/~magnus/book2scroll/index.html?lang=it&file={{BASEPAGENAMEE}}&startpage={{SUBPAGENAMEE}}]] |[[File:Library-logo-blue-outline.png|left|20px|link=http://toolserver.org/~magnus/book2scroll/index.html?lang=it&file={{{n}}}&startpage={{{p|1}}}]] }}<noinclude> See also [[:en:User:Magnus Manske/Book2scroll]]</noinclude>