Template:Nav-group: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(34 intermediate revisions by 2 users not shown)
Line 3: Line 3:
: <noinclude><!--
: <noinclude><!--
--></noinclude><noinclude><!--
--></noinclude><noinclude><!--
--></noinclude>{{ #if:{{{group|}}} | <div style="border-bottom:2px solid gray;">{{{group}}}</div> | }}<noinclude><!--
--></noinclude>{{ #if:{{{group|}}}   | <div style="border-bottom:2px solid gray; margin-bottom:4px;">{{{group}}}</div> | }}<noinclude><!--
--></noinclude>{{ #if:{{{related|}}} | <div style="border-top:2px solid gray; margin-top:4px;">{{{group}}}</div> | }}<noinclude><!--






                               --></noinclude>{{#if:{{{2link|}}}|{{{2link|}}} |{{linkappend|post={{{postappend|}}}|{{{2|}}}}}}}<noinclude><!--
                               --></noinclude>{{#if:{{{2link|}}}| {{{2link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{2|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{3|}}}{{{3link|}}}|•|}}{{#if:{{{3link|}}}|{{{3link|}}} |{{linkappend|post={{{postappend|}}}|{{{3|}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{3|}}}{{{3link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{3link|}}}| {{{3link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{3|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{4|}}}{{{4link|}}}|•|}}{{#if:{{{4link|}}}|{{{4link|}}} |{{linkappend|post={{{postappend|}}}|{{{4|}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{4|}}}{{{4link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{4link|}}}| {{{4link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{4|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{5|}}}{{{5link|}}}|•|}}{{#if:{{{5link|}}}|{{{35ink|}}} |{{linkappend|post={{{postappend|}}}|{{{5|}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{5|}}}{{{5link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{5link|}}}| {{{5link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{5|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{6|}}}{{{6link|}}}|•|}}{{#if:{{{6link|}}}|{{{6link|}}} |{{linkappend|post={{{postappend|}}}|{{{6|}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{6|}}}{{{6link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{6link|}}}| {{{6link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{6|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{7|}}}{{{7link|}}}|•|}}{{#if:{{{7link|}}}|{{{7link|}}} |{{linkappend|post={{{postappend|}}}|{{{7|}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{7|}}}{{{7link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{7link|}}}| {{{7link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{7|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{8|}}}{{{8link|}}}|•|}}{{#if:{{{8link|}}}|{{{8link|}}} |{{linkappend|post={{{postappend|}}}|{{{8|}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{8|}}}{{{8link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{8link|}}}| {{{8link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{8|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{9|}}}{{{9link|}}} |•|}}{{{9link|{{linkappend|post={{{postappend|}}}|{{{9|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{9|}}}{{{9link|}}}|<nowiki> &nbsp;</nowiki>|}}{{#if:{{{9link|}}}| {{{9link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{9|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{10|}}}{{{10link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{10link|{{linkappend|post={{{postappend|}}}|{{{10|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{10|}}}{{{10link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{10link|}}}| {{{10link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{10|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{11|}}}{{{11link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{11link|{{linkappend|post={{{postappend|}}}|{{{11|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{11|}}}{{{11link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{11link|}}}| {{{11link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{11|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{12|}}}{{{12link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{12link|{{linkappend|post={{{postappend|}}}|{{{12|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{12|}}}{{{12link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{12link|}}}| {{{12link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{12|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{13|}}}{{{13link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{13link|{{linkappend|post={{{postappend|}}}|{{{13|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{13|}}}{{{13link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{13link|}}}| {{{13link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{13|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{14|}}}{{{14link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{14link|{{linkappend|post={{{postappend|}}}|{{{14|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{14|}}}{{{14link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{14link|}}}| {{{14link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{14|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{15|}}}{{{15link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{15link|{{linkappend|post={{{postappend|}}}|{{{15|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{15|}}}{{{15link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{15link|}}}| {{{15link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{15|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{16|}}}{{{16link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{16link|{{linkappend|post={{{postappend|}}}|{{{16|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{16|}}}{{{16link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{16link|}}}| {{{16link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{16|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{17|}}}{{{17link|}}} |<nowiki> </nowiki>•&nbsp;  |}}{{{17link|{{linkappend|post={{{postappend|}}}|{{{17|}}}}}}}}<noinclude><!--
--></noinclude>{{#if:{{{17|}}}{{{17link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{17link|}}}| {{{17link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{17|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{18|}}}{{{18link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{18link| {{linkappend|post={{{postappend|}}}|{{{18|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{18|}}}{{{18link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{18link|}}}| {{{18link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{18|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{19|}}}{{{19link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{19link| {{linkappend|post={{{postappend|}}}|{{{19|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{19|}}}{{{19link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{19link|}}}| {{{19link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{19|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{20|}}}{{{20link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{20link| {{linkappend|post={{{postappend|}}}|{{{20|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{20|}}}{{{20link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{20link|}}}| {{{20link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{20|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{21|}}}{{{21link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{21link| {{linkappend|post={{{postappend|}}}|{{{21|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{21|}}}{{{21link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{21link|}}}| {{{21link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{21|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{22|}}}{{{22link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{22link| {{linkappend|post={{{postappend|}}}|{{{22|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{22|}}}{{{22link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{22link|}}}| {{{22link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{22|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{23|}}}{{{23link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{23link| {{linkappend|post={{{postappend|}}}|{{{23|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{23|}}}{{{23link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{23link|}}}| {{{23link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{23|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{24|}}}{{{24link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{24link| {{linkappend|post={{{postappend|}}}|{{{24|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{24|}}}{{{24link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{24link|}}}| {{{24link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{24|}}} }}}}<noinclude><!--
--></noinclude>{{#if:{{{25|}}}{{{25link|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{25link| {{linkappend|post={{{postappend|}}}|{{{25|}}} }} }}}<noinclude><!--
--></noinclude>{{#if:{{{25|}}}{{{25link|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{25link|}}}| {{{25link|}}} |{{linkappend|lc={{{lc|}}}|pre={{{preappend|}}}|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{25|}}} }}}}<noinclude><!--




Line 37: Line 38:
Example:
Example:
{{nav
{{nav
  |{{nav-group
|{{nav-group
  | group=[[Overlay|Example data]]
| group=[[Overlay|Example data]]
  }}
}}
{{nav-group
{{nav-group
  | postappend=&nbsp;Overlay
| postappend=&nbsp;Overlay
  | Overlays
| Overlays
  | City | Ownership | Zoning |
| City
  }}
| Ownership
| Zoning
}}
{{nav-group
{{nav-group
  | postappend=|Community
| postappend=|Community
  ||2link= [[Community Hub|Community]] | Forum | Tickets ||5link= [[ArcGIS Login|Sign in ArcGIS]] |
| | 2link= [[Community]]
  }}
| | 5link= [[ArcGIS Pro|Sign in ArcGIS]]
}}
{{nav-group
| postdepend=_postdepended
| Community
| | 5link= [[ArcGIS Pro|Sign in ArcGIS]]
}}
{{nav-group
| preappend=Select&nbsp;
| postappend=&nbsp;(TQL)
| lc=true
| [[TQL]]
| Attribute
| Name
| Floorsize
| | 7link= [[Update (TQL)|Update]]
}}
}}
}}


Line 56: Line 75:
* 1: Name of the group
* 1: Name of the group
* 2..n: Entry in the group. Automatically linkified.
* 2..n: Entry in the group. Automatically linkified.
* 2link..nlink: Replacement for a specific entry in a group, to facilitate defined links. Preferably not used, but can facilitate external links for example. Don't forget to skip the associated number.
* postappend: What to append every name with. (e.g. "Heat Stress" as text, "Heat Stress Overlay" as link, postappend should be "&amp;nbsp;Overlay")
* postappend: What to append every name with. (e.g. "Heat Stress" as text, "Heat Stress Overlay" as link, postappend should be "&amp;nbsp;Overlay")
* postdepend: What to append every name with, but not the link, opposite of postappend.
* preappend: What to append every name with. (e.q. "Attribute as text, "Select Attribute" as text, preappend should be "Select&nbsp")
* group: Title or link, if this is a main group indicator. Should not be used along with 2...n.
* group: Title or link, if this is a main group indicator. Should not be used along with 2...n.
* lc:if present, lowercase the main text of link url itself (not the pre/postfixes, and not the displayed text)


Additional parameters can be generated with:
Additional parameters can be generated with:
Line 63: Line 86:
var itterations=25;
var itterations=25;


var base='--></noinclude>{{#if:{{{%s|}}}{{{%slink|}}} | <nowiki> </nowiki>•&nbsp;  |}}{{{%slink| {{linkappend|post={{{postappend|}}}|{{{%s|}}} }} }}}<noinclude><!--';
var base='--></noinclude>{{#if:{{{%s|}}}{{{%slink|}}}|<nowiki> •&nbsp;</nowiki>|}}{{#if:{{{%slink|}}}|<nowiki> </nowiki>{{{%slink|}}}<nowiki> </nowiki>|{{linkappend|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{%s|}}} }}}}<noinclude><!--';
var output = '--></noinclude>{{{%slink| {{linkappend|post={{{postappend|}}}|{{{%s|}}} }} }}}<noinclude><!--'.split('%s').join(2);
var output = '                               --></noinclude>{{#if:{{{%slink|}}}|<nowiki> </nowiki>{{{%slink|}}}<nowiki> </nowiki>|{{linkappend|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{%s|}}} }}}}<noinclude><!--'.split('%s').join(2);
for (var i=3; i<=itterations ; i++ ) {
for (var i=3; i<=itterations ; i++ ) {
     output = output + '\r\n'+base.split('%s').join(i);
     output = output + '\r\n'+base.split('%s').join(i);

Latest revision as of 13:32, 13 December 2023

Example:


To be used in a Template:nav.

Parameters:

  • 1: Name of the group
  • 2..n: Entry in the group. Automatically linkified.
  • 2link..nlink: Replacement for a specific entry in a group, to facilitate defined links. Preferably not used, but can facilitate external links for example. Don't forget to skip the associated number.
  • postappend: What to append every name with. (e.g. "Heat Stress" as text, "Heat Stress Overlay" as link, postappend should be "&nbsp;Overlay")
  • postdepend: What to append every name with, but not the link, opposite of postappend.
  • preappend: What to append every name with. (e.q. "Attribute as text, "Select Attribute" as text, preappend should be "Select&nbsp")
  • group: Title or link, if this is a main group indicator. Should not be used along with 2...n.
  • lc:if present, lowercase the main text of link url itself (not the pre/postfixes, and not the displayed text)

Additional parameters can be generated with:

var itterations=25;

var base='--></noinclude>{{#if:{{{%s|}}}{{{%slink|}}}| • |}}{{#if:{{{%slink|}}}| {{{%slink|}}} |{{linkappend|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{%s|}}} }}}}<noinclude><!--';
var output = '                               --></noinclude>{{#if:{{{%slink|}}}| {{{%slink|}}} |{{linkappend|post={{{postappend|}}}|postd={{{postdepend|}}}| 1={{{%s|}}} }}}}<noinclude><!--'.split('%s').join(2);
for (var i=3; i<=itterations ; i++ ) {
    output = output + '\r\n'+base.split('%s').join(i);
}
console.log(output);