Jump to content

Template:EAC guides: Difference between revisions

From Hydrogenaudio Knowledgebase
Korth (talk | contribs)
m add parameter for External Compression Guides category
Korth (talk | contribs)
m add usage instructions
Line 40: Line 40:
|-
|-
|}
|}
<includeonly>{{#ifeq: {{PAGENAME}} | Exact Audio Copy | | [[Category:EAC Guides{{#if:{{{sort|}}}|{{!}}{{{sort}}}}}]]{{#if:{{{encoder|}}}|[[Category:EAC External Compression Guides{{#if:{{{sort|}}}|{{!}}{{{sort}}}}}]]}} }}</includeonly><noinclude>
<includeonly>{{#ifeq: {{PAGENAME}} | Exact Audio Copy | | {{#if:{{{noeacguides|{{{3|}}}}}}| |[[Category:EAC Guides{{#if:{{{sort|{{{1|}}}}}}|{{!}}{{{sort|{{{1}}}}}}}}]]}}{{#if:{{{encoder|{{{2|}}}}}}|[[Category:EAC External Compression Guides{{#if:{{{sort|{{{1|}}}}}}|{{!}}{{{sort|{{{1}}}}}}}}]]}} }}</includeonly><noinclude>
A list of [[Exact Audio Copy]] guides. Can be used to simplify guide navigation.
== Usage ==
Adding this template to a page automatically adds the page to
This template displays a sidebar table of [[Exact Audio Copy]] guides and categorizes the page accordingly. It should be placed at the '''top of the page''', before any other content, to ensure the guide table appears in the correct position.
<nowiki>[[Category:EAC Guides]]</nowiki>
The page can be sorted within the category by defining a sortkey.
==Syntax==
<pre style="display:table">{{EAC guides}}


{{EAC guides|sort=sortkey}}</pre>
=== What It Does ===
* '''Displays''' a floating table of EAC-related guide links.
* '''Automatically adds''' the page to [[:Category:EAC Guides]].
* '''Optionally adds''' the page to [[:Category:EAC External Compression Guides]] for external encoder-related guides if the second parameter (`encoder`) is set.
* '''Optionally excludes''' the page from [[:Category:EAC Guides]] if the third parameter (`noeacguides`) is set.
* '''Optionally sorts''' the page within added categories using the `sort` parameter.
* '''Automatically excludes''' the page titled [[Exact Audio Copy]] from all categorization.
 
=== Named Parameters ===
* '''sort''' – Sets the sort key used in both categories.
* '''encoder''' – If set (e.g., `yes`), adds the page to [[:Category:EAC External Compression Guides]].
* '''noeacguides''' – If set (e.g., `yes`), prevents the page from being added to [[:Category:EAC Guides]].
 
=== Syntax ===
You can use either named or positional parameters (see table below):
 
<div style="clear: both;"></div>
{| class="wikitable"
! Syntax !! Description
|-
| <nowiki>{{EAC guides}}</nowiki> || Displays the guide table and adds the page to '''[[:Category:EAC Guides]]''' only
|-
| <nowiki>{{EAC guides|sortkey}}</nowiki> || Displays the guide table and adds the page to '''[[:Category:EAC Guides]]''' with sort key "sortkey"
|-
| <nowiki>{{EAC guides|sortkey|yes}}</nowiki> || Displays the guide table and adds the page to '''[[:Category:EAC Guides]]''' and '''[[:Category:EAC External Compression Guides]]''' with sort key "sortkey"
|-
| <nowiki>{{EAC guides||yes}}</nowiki> || Displays the guide table and adds the page to '''[[:Category:EAC Guides]]''' and '''[[:Category:EAC External Compression Guides]]''' without a sort key
|-
| <nowiki>{{EAC&#160;guides|sortkey|yes|yes}}</nowiki> || Displays the guide table and adds the page to '''[[:Category:EAC External Compression Guides]]''' only (excludes '''[[:Category:EAC Guides]]''') with sort key "sortkey"
|-
| <pre>{{EAC guides
|sort=sortkey
|encoder=yes
|noeacguides=yes}}</pre> || Same as above, using named parameters instead of positional ones. Multiline format shown for clarity.
|}
</noinclude>
</noinclude>

Revision as of 16:22, 7 September 2025

Usage

This template displays a sidebar table of Exact Audio Copy guides and categorizes the page accordingly. It should be placed at the top of the page, before any other content, to ensure the guide table appears in the correct position.

What It Does

  • Displays a floating table of EAC-related guide links.
  • Automatically adds the page to Category:EAC Guides.
  • Optionally adds the page to Category:EAC External Compression Guides for external encoder-related guides if the second parameter (`encoder`) is set.
  • Optionally excludes the page from Category:EAC Guides if the third parameter (`noeacguides`) is set.
  • Optionally sorts the page within added categories using the `sort` parameter.
  • Automatically excludes the page titled Exact Audio Copy from all categorization.

Named Parameters

Syntax

You can use either named or positional parameters (see table below):

Syntax Description
{{EAC guides}} Displays the guide table and adds the page to Category:EAC Guides only
{{EAC guides|sortkey}} Displays the guide table and adds the page to Category:EAC Guides with sort key "sortkey"
{{EAC guides|sortkey|yes}} Displays the guide table and adds the page to Category:EAC Guides and Category:EAC External Compression Guides with sort key "sortkey"
{{EAC guides||yes}} Displays the guide table and adds the page to Category:EAC Guides and Category:EAC External Compression Guides without a sort key
{{EAC guides|sortkey|yes|yes}} Displays the guide table and adds the page to Category:EAC External Compression Guides only (excludes Category:EAC Guides) with sort key "sortkey"
{{EAC guides
|sort=sortkey
|encoder=yes
|noeacguides=yes}}
Same as above, using named parameters instead of positional ones. Multiline format shown for clarity.