Template:TabsBar
来自Valve Developer Community
跳转到导航
跳转到搜索

文档页面 Template:TabsBar/doc/zh 不存在。
模板将改为显示英文文档。如果此消息后没有任何内容,则很可能该文档甚至不存在英文版本。
模板将改为显示英文文档。如果此消息后没有任何内容,则很可能该文档甚至不存在英文版本。
Improved version of {{Tabs}}. Instead of editing all the pages that are in the tabs when a change is needed this works by making specific tab bar as its own template for chosen pages which is shared by all pages. Can also use presets mentioned lower but then each page needs to be edited individually for any future changes.
- {{{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. (not specifying means full page name without language prefix will be used)
Tab bar creation process:
- place {{TabsBar}} on main page (this should be an english page that has no
' (<engine/game>)'
suffix in its link meaning it's a page containing Source engine topic) - click show preview to generate page create link with preloaded text linking to
Template:TabsBar/<full page name>
- click the link it shows and follow instruction shown by preload
- put {{TabsBar|main=case sensitive name of the created tab bar}} on other related pages
use examples (see all):
- player and {{TabsBar/Player}}
- env_beam and {{TabsBar/Env beam}}
- npc_headcrab and {{TabsBar/Npc headcrab}}
- npc_vortigaunt and {{TabsBar/Npc vortigaunt}}
- func water (Source) and {{TabsBar/Func water (Source)}}
- {{{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 2)'
- {{TabsBar/hls}} - usage {{TabsBar|main=hls|base=xxx}} - For entities in GoldSrc and Half-Life: Source (也存在于
之中), but no other Source 1 games (besides
), where page names are
'xxx (GoldSrc)', 'xxx (Half-Life: Source)'

See also
- {{TabsBar/tab}} - single tab
- {{TabsBar/subtab}} - multiple links in single tab (supports 3 links for now, see {{TabsBar/Tool_textures}} for use example)