More actions
Content deleted Content added
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{{1}}}[[Category:Deliveries]]{{#if:{{{magic|}}}|{{#ifeq:{{FULLPAGENAME}}|{{PAGENAME}}|[[Category:Spell Deliveries]]}}|}}</includeonly> |
<includeonly>{{{1}}}{{#ifeq:{{FULLPAGENAME}}|{{PAGENAME}}|[[Category:Deliveries]]}}{{#if:{{{magic|}}}|{{#ifeq:{{FULLPAGENAME}}|{{PAGENAME}}|[[Category:Spell Deliveries]]}}|}}</includeonly><noinclude> |
||
== Template Frontend == |
|||
This template is used to categorize pages as [[:Category:Deliveries|Deliveries]] or [[:Category:Spell Deliveries|Spell Deliveries]] based on the provided parameters and the page context. |
|||
=== Parameters === |
|||
* <code>1</code>: str |
|||
*: The content to be displayed on the page where the template is transcluded. |
|||
* <code>magic</code>: bool (optional, defaults to no value) |
|||
*: A flag that determines if the page should also be categorized as a [[:Category:Spell Deliveries|Spell Delivery]]. |
|||
*:; Note |
|||
*:: If <code>magic</code> is provided and not empty, the page will be categorized as both [[:Category:Deliveries|Deliveries]] and [[:Category:Spell Deliveries|Spell Deliveries]]. |
|||
=== Additional Information === |
|||
* Pages will only be categorized if they are viewed directly (not transcluded elsewhere), as the categorization depends on whether the page's full name matches its base name. |
|||
== Template Backend == |
|||
The template uses: |
|||
* <code>{{#ifeq:{{FULLPAGENAME}}|{{PAGENAME}}|...</code> to ensure categorization only applies to the current page and not transcluded instances. |
|||
* <code>{{#if:{{{magic|}}}|...</code> to conditionally categorize pages as [[:Category:Spell Deliveries|Spell Deliveries]] based on the <code>magic</code> parameter. |
|||
</noinclude> |
Latest revision as of 01:17, 25 December 2024
Template Frontend
This template is used to categorize pages as Deliveries or Spell Deliveries based on the provided parameters and the page context.
Parameters
1
: str- The content to be displayed on the page where the template is transcluded.
magic
: bool (optional, defaults to no value)- A flag that determines if the page should also be categorized as a Spell Delivery.
- Note
- If
magic
is provided and not empty, the page will be categorized as both Deliveries and Spell Deliveries.
- A flag that determines if the page should also be categorized as a Spell Delivery.
Additional Information
- Pages will only be categorized if they are viewed directly (not transcluded elsewhere), as the categorization depends on whether the page's full name matches its base name.
Template Backend
The template uses:
{{#ifeq:Template:Delivery|Delivery|...
to ensure categorization only applies to the current page and not transcluded instances.{{#if:|...
to conditionally categorize pages as Spell Deliveries based on themagic
parameter.