Difference between revisions of "Template talk:Navbox small"
(Should be fixed, I think) |
(now support namespace; what next? multi-category?) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
If I understood your intention correctly, it now works! I'm not sure what was happening with those 3= and 4= things so I nested it. What it now does is what you wanted, right? --[[User:Rednaxela|Rednaxela]] 05:04, 26 April 2009 (UTC) | If I understood your intention correctly, it now works! I'm not sure what was happening with those 3= and 4= things so I nested it. What it now does is what you wanted, right? --[[User:Rednaxela|Rednaxela]] 05:04, 26 April 2009 (UTC) | ||
+ | |||
+ | Yeah, correct. Thank you very much! The 3= and 4= thing is not necessary. About the namespace, <nowiki>{{FULLPAGENAME}}</nowiki> should handler namespace correctly so I think we can make a change to make this template work in other namespace than (main) namespace. Currently, if you want to use it in other namespace, you need to specify parent with namespace. Just thinking, will this better for the template (I do not want to broke the template) : | ||
+ | <pre> | ||
+ | ; {{{title|Navigation}}}<nowiki>:</nowiki> | ||
+ | :<!-- | ||
+ | -->{{if|test={{{parent|}}}|then={{ifeq|{{{parent}}}|{{PAGENAME}}|<!--nothing-->|{{ifeq|{{{parent}}}|{{FULLPAGENAME}}|<!--nothing-->|[[{{{parent}}}]] - }}}}}}<!-- | ||
+ | -->{{if|test={{{page1|}}}|then=[[{{{parent|{{FULLPAGENAME}}}}}/{{{page1}}}{{!}}{{{title1|{{{page1}}}}}}]]}}<!-- | ||
+ | -->... | ||
+ | </pre> | ||
+ | This way will match parent even user specify namespace to parent. Comments are welcome. » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 08:04, 26 April 2009 (UTC) | ||
+ | |||
+ | Just edit and it now fully support namespace. I can't believe that now the [[Template:Navbox small]] is more ''complex'' than the [[Template:Navbox]] lol. Eclipse PDT help me very much when I realize that I forgot to close some brace. I now use a script to generate the template so if you want more item, just let me know and I can update within a minute. | ||
+ | |||
+ | I realize that some of you may want to make it multiline-able. I have thinking this for a while. For some page that has a LOT of sub-pages (see [[Dookious]]) they may want to categorize it. I may have this syntax: | ||
+ | <pre> | ||
+ | {{Navbox small | ||
+ | | title = Sub-pages | ||
+ | | parent = Dookious | ||
+ | | parentSeparateGroup = yes | ||
+ | | page1 = DookiCape | ||
+ | | page2 = DookiLigthing | ||
+ | | g2title = [[:Caregory:Archived Talk|]] | ||
+ | | g2page1 = Archived Talk XXXXXXXX | ||
+ | | g2page2 = Archived Talk XXXXXXXX | ||
+ | | g2page3 = Archived Talk XXXXXXXX | ||
+ | | g3title = Something | ||
+ | | g3page1 = Something | ||
+ | ... | ||
+ | }} | ||
+ | </pre> | ||
+ | or | ||
+ | <pre> | ||
+ | {{Navbox small | ||
+ | | title = Sub-pages | ||
+ | | parent = Dookious | ||
+ | | grouping = tyes | ||
+ | | parentSeparateGroup = yes | ||
+ | | g1title = Component | ||
+ | | g1page1 = DookiCape | ||
+ | | g1page2 = DookiLigthing | ||
+ | | g2title = [[:Category:Archived Talk|]] | ||
+ | | g2page1 = Archived Talk XXXXXXXX | ||
+ | | g2page2 = Archived Talk XXXXXXXX | ||
+ | | g2page3 = Archived Talk XXXXXXXX | ||
+ | | g3title = Something | ||
+ | | g3page1 = Something | ||
+ | ... | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | I also think of [[Template:Navbar small]] but I don't really know who want it. It will look like the one on [[Darkcanuck/RRServer]]. Please shere your ideas. I don't really know you all want me to do this or not! (or this is not Wikipedia-like? mean that if I want to do, do it, no need to wait for discussion?) » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 08:10, 2 May 2009 (UTC) |
Latest revision as of 09:10, 2 May 2009
Hey all. Can anyone look at the (commented) ifeq line at the template? I don't have any ideas why it don't work. Help me! » Nat | Talk » 03:12, 26 April 2009 (UTC)
If I understood your intention correctly, it now works! I'm not sure what was happening with those 3= and 4= things so I nested it. What it now does is what you wanted, right? --Rednaxela 05:04, 26 April 2009 (UTC)
Yeah, correct. Thank you very much! The 3= and 4= thing is not necessary. About the namespace, {{FULLPAGENAME}} should handler namespace correctly so I think we can make a change to make this template work in other namespace than (main) namespace. Currently, if you want to use it in other namespace, you need to specify parent with namespace. Just thinking, will this better for the template (I do not want to broke the template) :
; {{{title|Navigation}}}: :<!-- -->{{if|test={{{parent|}}}|then={{ifeq|{{{parent}}}|{{PAGENAME}}|<!--nothing-->|{{ifeq|{{{parent}}}|{{FULLPAGENAME}}|<!--nothing-->|[[{{{parent}}}]] - }}}}}}<!-- -->{{if|test={{{page1|}}}|then=[[{{{parent|{{FULLPAGENAME}}}}}/{{{page1}}}{{!}}{{{title1|{{{page1}}}}}}]]}}<!-- -->...
This way will match parent even user specify namespace to parent. Comments are welcome. » Nat | Talk » 08:04, 26 April 2009 (UTC)
Just edit and it now fully support namespace. I can't believe that now the Template:Navbox small is more complex than the Template:Navbox lol. Eclipse PDT help me very much when I realize that I forgot to close some brace. I now use a script to generate the template so if you want more item, just let me know and I can update within a minute.
I realize that some of you may want to make it multiline-able. I have thinking this for a while. For some page that has a LOT of sub-pages (see Dookious) they may want to categorize it. I may have this syntax:
{{Navbox small | title = Sub-pages | parent = Dookious | parentSeparateGroup = yes | page1 = DookiCape | page2 = DookiLigthing | g2title = [[:Caregory:Archived Talk|]] | g2page1 = Archived Talk XXXXXXXX | g2page2 = Archived Talk XXXXXXXX | g2page3 = Archived Talk XXXXXXXX | g3title = Something | g3page1 = Something ... }}
or
{{Navbox small | title = Sub-pages | parent = Dookious | grouping = tyes | parentSeparateGroup = yes | g1title = Component | g1page1 = DookiCape | g1page2 = DookiLigthing | g2title = [[:Category:Archived Talk|]] | g2page1 = Archived Talk XXXXXXXX | g2page2 = Archived Talk XXXXXXXX | g2page3 = Archived Talk XXXXXXXX | g3title = Something | g3page1 = Something ... }}
I also think of Template:Navbar small but I don't really know who want it. It will look like the one on Darkcanuck/RRServer. Please shere your ideas. I don't really know you all want me to do this or not! (or this is not Wikipedia-like? mean that if I want to do, do it, no need to wait for discussion?) » Nat | Talk » 08:10, 2 May 2009 (UTC)