Jump to content

Template:Tag: Difference between revisions

From WYOS Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
{{{content|}}}
{{{content|}}}
<div style="display:none;">
<div style="display:none;">
<!-- Invisible Data Section -->
<!--  
<!--  
   This sets the display title.  
   This sets the display title.  
   If the 'display_title' parameter is provided in the template call, it uses that.
   If the 'display_title' parameter is provided, it uses that.
   If not, it defaults to the base name of the page itself (e.g., for "Tag:Habits", it uses "Habits").
   If not, it defaults to the page name WITHOUT the namespace (e.g., "Habits" for "Tag:Habits").
-->
-->
[[Has display title::{{#if:{{{display_title|}}}|{{{display_title}}}|{{BASEPAGENAME}}}}]]
[[Has display title::{{#if:{{{display_title|}}}|{{{display_title}}}|{{PAGENAME}}}}]]
 
<!-- This preserves the Main Category association for the topic. -->
{{#if:{{{main_category|}}}|[[Belongs to main category::{{{main_category}}}]]}}
{{#if:{{{main_category|}}}|[[Belongs to main category::{{{main_category}}}]]}}
</div>
</div>
[[Category:Topic Tags]]
[[Category:Topic Tags]]
</includeonly><noinclude>
</includeonly><noinclude>
This template is for all pages in the "Tag:" namespace.
This template is for all pages in the "Tag:" namespace.
== Usage ==
== Usage ==
=== Standard Usage ===
For a page like "Tag:Habits", where the display title is the same as the page name.
{{Tag
{{Tag
|content=A description of the Habits topic goes here.
|display_title=Custom Title (Optional)
|main_category=Achieve Goals
|main_category=Achieve Goals
}}
|content=A description of the topic goes here.
=== Custom Display Title ===
For a page like "Tag:AI", where you want a different display title.
{{Tag
|display_title=Artificial Intelligence
|content=A description of the AI topic goes here.
}}
}}
</noinclude>
</noinclude>

Revision as of 01:10, 29 July 2025

This template is for all pages in the "Tag:" namespace.

Usage

A description of the topic goes here.

Custom Title (Optional)

Achieve Goals