Template:TabsBar/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
improved version of {{T|Tabs}}
Improved version of {{T|Tabs}}. Instead of editing all the pages that are in the tabs this works by making specific tab bar as its own template for chosen pages.


instead of editing all the pages that are in the tabs this works by making specific tab bar as its own template for chosen pages
* {{param|main}} - This template will look for defined tab bar at <code>Template:TabsBar/{{param|main}}</code> and if it exist it will get transcluded. If it doesn't exist it will create a link you can click to create the tab bar predefined by following preload [[Template:TabsBar/preload]].
 
 
use: place <nowiki>{{TabsBar}}</nowiki> on main page, click show preview, click link it shows and follow instruction shown by preload, put <nowiki>{{TabsBar|main=whatever was chosen}}</nowiki> on other related pages


Tab bar creation process:
# place <nowiki>{{TabsBar}}</nowiki> on main page (this should be page that has no (<engine/game>) in its link meaning its page for Source engine topic)
# click show preview which will show you page create link with preloaded text at <code>Template:TabsBar/<full page name></code>
# click the link it shows and follow instruction shown by preload
# put <nowiki>{{TabsBar|main=case sensitive name of the created tab bar}}</nowiki> on other related pages


use examples:
use examples:
Line 14: Line 16:
*[[func water (Source)]] and {{T|TabsBar/Func water (Source)}}
*[[func water (Source)]] and {{T|TabsBar/Func water (Source)}}


Presets:
* {{T|TabsBar/gs}} - usage {{T|TabsBar|{{P|main|gs}}{{P|base|xxx}}}} - For entities in GoldSrc and Source 1, where pages names are 'xxx (GoldSrc)', 'xxx'
* {{T|TabsBar/s2}} - usage {{T|TabsBar|{{P|main|s2}}{{P|base|xxx}}}} - For entities in Source 1 and Source 2, where pages names are 'xxx', 'xxx (Source 2)'
* {{T|TabsBar/gs2}} - usage {{T|TabsBar|{{P|main|gs2}}{{P|base|xxx}}}} - For entities in GoldSrc, Source 1 and Source 2, where pages names are 'xxx (GoldSrc)', 'xxx', 'xxx (Source)'
* {{T|TabsBar/hls}} - usage {{T|TabsBar|{{P|main|hls}}{{P|base|xxx}}}} - For entities in GoldSrc and Half-Life: Source {{hldms|also}}, but no other Source 1 games, where pages names are 'xxx (GoldSrc)', 'xxx (Half-Life: Source)'


{{todo|finish doccumentation }} <!-- whoever -->
* {{param|base}} - to be used with following presets:
{{todo|Link to subpages}}
:{{T|TabsBar/gs}} - usage {{T|TabsBar|{{P|main|gs}}{{P|base|xxx}}}} - For entities in GoldSrc and Source 1, where page names are <code>'xxx (GoldSrc)', 'xxx'</code>
:{{T|TabsBar/s2}} - usage {{T|TabsBar|{{P|main|s2}}{{P|base|xxx}}}} - For entities in Source 1 and Source 2, where pages name are <code>'xxx', 'xxx (Source 2)'</code>
:{{T|TabsBar/gs2}} - usage {{T|TabsBar|{{P|main|gs2}}{{P|base|xxx}}}} - For entities in GoldSrc, Source 1 and Source 2, where page names are <code>'xxx (GoldSrc)', 'xxx', 'xxx (Source)'</code>
:{{T|TabsBar/hls}} - usage {{T|TabsBar|{{P|main|hls}}{{P|base|xxx}}}} - For entities in GoldSrc and Half-Life: Source {{hldms|also}}, but no other Source 1 games, where page names are <code>'xxx (GoldSrc)', 'xxx (Half-Life: Source)'</code>

Revision as of 16:35, 4 September 2024

Improved version of {{Tabs}}. Instead of editing all the pages that are in the tabs this works by making specific tab bar as its own template for chosen pages.

  • {{{main}}} - This template will look for defined tab bar at Template:TabsBar/{{{main}}} and if it exist it will get transcluded. If it doesn't exist it will create a link you can click to create the tab bar predefined by following preload Template:TabsBar/preload.

Tab bar creation process:

  1. place {{TabsBar}} on main page (this should be page that has no (<engine/game>) in its link meaning its page for Source engine topic)
  2. click show preview which will show you page create link with preloaded text at Template:TabsBar/<full page name>
  3. click the link it shows and follow instruction shown by preload
  4. put {{TabsBar|main=case sensitive name of the created tab bar}} on other related pages

use examples:


  • {{{base}}} - to be used with following presets:
{{TabsBar/gs}} - usage {{TabsBar|main=gs|base=xxx}} - For entities in GoldSrc and Source 1, where page names are 'xxx (GoldSrc)', 'xxx'
{{TabsBar/s2}} - usage {{TabsBar|main=s2|base=xxx}} - For entities in Source 1 and Source 2, where pages name are 'xxx', 'xxx (Source 2)'
{{TabsBar/gs2}} - usage {{TabsBar|main=gs2|base=xxx}} - For entities in GoldSrc, Source 1 and Source 2, where page names are 'xxx (GoldSrc)', 'xxx', 'xxx (Source)'
{{TabsBar/hls}} - usage {{TabsBar|main=hls|base=xxx}} - For entities in GoldSrc and Half-Life: Source (also in Half-Life Deathmatch: Source), but no other Source 1 games, where page names are 'xxx (GoldSrc)', 'xxx (Half-Life: Source)'