Template:PageTitle: Difference between revisions

From Step Mods | Change The Game
m (Text replacement - "{{fc|important|" to "{{Fc|highlight|")
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>__NOTITLE__<div class="media pagetitle mt-1"><div class="align-self-center mr-3">[[File:{{#switch:{{{logo|}}}| delta=Delta_c.png
<includeonly>__NOTOC____NOTITLE__<div class="media pagetitle mt-1"><div class="align-self-center mr-3">[[File:{{#switch:{{{logo|}}}| delta=Delta_c.png
| mo=Moicon.png
| fnv=Fnv_flare.png
| fo3=Fo3_flare.png
| fo3=Fo3_flare.png
| fo4=Fo4_flare.png
| fo4=Fo4_flare.png
| fnv=Fnv_flare.png
| mo=Moicon.png
| mo2=Moicon.png
| morrowind=Morrowind_flare.png
| morrowind=Morrowind_flare.png
| nms=Nomanssky_flare.png
| nomanssky=Nomanssky_flare.png
| nomanssky=Nomanssky_flare.png
| oblivion=Oblivion_flare.png
| oblivion=Oblivion_flare.png
| skyrim=Skyrim_flare.png
| skyrim
| skyrimle=Skyrim_flare.png
| skyrimse=Skyrimse_flare.png
| skyrimse=Skyrimse_flare.png
| #default=Delta_c.png }}|105px|class={{{classList|}}}]]</div><div class="media-body align-self-center mt-1"><p class="pagetitle-title mb-0">{{{title}}}</p>{{#if:{{{subtitle|}}}|<p class="pagetitle-subtitle mt-n2 mb-1">{{{subtitle}}}</p>}}{{#if:{{{author|}}}|<p class="mb-0">''by: {{{author}}}''}} {{#if:{{{forumtid|}}}|&nbsp;{{!}}&nbsp;[https://stepmodifications.org/forum/topic/{{{forumtid}}}-- '''Forum Topic''']</p>|{{#if:{{{forumtid|}}}|<p class="mb-0">[https://stepmodifications.org/forum/topic/{{{forumtid}}}-- '''Forum Topic''']</p>}}}}</div></div></includeonly><noinclude>__NOTOC__[[Category:Formatting Templates]]
| starfield=Starfield_flare.png
| #default=Delta_c.png }}|105px]]</div><div class="media-body align-self-center mt-1"><p class="pagetitle-title mb-0">{{{title}}}</p>{{#if:{{{subtitle|}}}|<p class="pagetitle-subtitle mt-n2 mb-1">{{{subtitle}}}</p>}}{{#if:{{{author|}}}|<p class="mb-0">''by: {{{author}}}''}} {{#if:{{{forumtid|}}}|&nbsp;{{!}}&nbsp;[https://stepmodifications.org/forum/topic/{{{forumtid}}}-- '''Forum Topic''']</p>|{{#if:{{{forumtid|}}}|<p class="mb-0">[https://stepmodifications.org/forum/topic/{{{forumtid}}}-- '''Forum Topic''']</p>}}}}</div></div>{{#ifeq: {{#titleparts: {{FULLPAGENAME}} | | -1 }} | {{FULLPAGENAME}} | | <div class="container mt-n4 mb-4 pl-0" style="font-size:0.9rem"><i class="fas fa-chevron-left pr-2"></i> [[{{NAMESPACEE}}:{{ROOTPAGENAMEE}}|{{ROOTPAGENAME}}]]</div> | }}</includeonly><noinclude>__NOTOC__[[Category:Formatting Templates]][[Category:Layout Templates]][https://stepmodifications.org/forum/topic/15978-pagetitle/ '''Forum Topic''']


==Purpose & Usage==
==Purpose & Usage==
Used at top of pages to include a standardized page-title header. This template relies upon global CSS classes.  
Used at top of pages to include a standardized page-title header. Transclusion of this template onto a subpage will preserve the breadcrumb link to the parent root page.
{{Alert|type=notice|text=EDITORS: This template will allow any image uploaded to the wiki. PM an administrator to add an image to this template if it does not exist. The format for image icons is 105+ px X 105+ px. This template also includes the <code><nowiki>__NOTITLE__</nowiki></code> behavior switch by default; therefore, it's not necessary to include it on the page when the PageTitle template is used.}}
{{Alert|type=notice|text=This template allows the use of any image uploaded to the wiki. DM an administrator to add an image to this template if it does not exist.
====Available images====
* The image size minimum for logos is 105x105 pixels. Recommended size is approximately 512x512 pixels, which will be shrunk to fit the template.
{{GallerySimple|id=1|width=105|img=File:Delta_c.png|caption=Default}}{{GallerySimple|id=1|width=105|img=File:Moicon.png}}{{GallerySimple|id=1|width=105|img=File:Fo3_flare.png}}{{GallerySimple|id=1|width=105|img=File:Fo4_flare.png}}
* This template includes the <code><nowiki>__NOTITLE__</nowiki></code> behavior switch by default; therefore, it's not necessary to include it on a page when the PageTitle template is used.}}
{{GallerySimple|id=1|width=105|img=File:Morrowind_flare.png}}{{GallerySimple|id=1|width=105|img=File:Nomanssky_flare.png}}{{GallerySimple|id=1|width=105|img=File:Oblivion_flare.png}}{{GallerySimple|id=1|width=105|img=File:Skyrim_flare.png}}{{GallerySimple|id=1|width=105|img=File:Skyrimse_flare.png}}
 
=== Required Parameters ===
<span class="salmontx">'''title'''</span> - Sets the title
: '''Values'''
:: Default: n/a, <code>title=''TitleHere''</code>
 
=== Optional Parameters ===
<span class="salmontx">'''logo'''</span> - Displays a logo to the left of the content
: '''Values'''
:: Default: <code>logo=delta</code>
====General Logos====
: {{GallerySimple|id=1|width=95|img=File:Delta_c.png|caption=delta}}{{GallerySimple|id=1|width=95|img=File:Moicon.png|caption=mo, mo2}}
{{clear}}
====Game Logos====
: {{GallerySimple|id=1|width=95|img=File:Fo3_flare.png|caption=fo3}}{{GallerySimple|id=1|width=95|img=File:Fo4_flare.png|caption=fo4}}{{GallerySimple|id=1|width=95|img=File:Fnv_flare.png|caption=fnv}}{{GallerySimple|id=1|width=95|img=File:Morrowind_flare.png|caption=morrowind}}{{GallerySimple|id=1|width=95|img=File:Nomanssky_flare.png|caption=nomanssky, nms}}{{GallerySimple|id=1|width=95|img=File:Oblivion_flare.png|caption=oblivion}}{{GallerySimple|id=1|width=95|img=File:Skyrim_flare.png|caption=skyrimle}}{{GallerySimple|id=1|width=95|img=File:Skyrimse_flare.png|caption=skyrimse}}{{GallerySimple|id=1|width=95|img=File:Starfield_flare.png|caption=starfield}}
{{clear}}
{{clear}}
===Parameters:===
==== Required ====
; {{fc|red|<nowiki>title=</nowiki>}}
: This is the text that displays for the title and is a required parameter.
: '''How to use:''' <code>title=text</code>


==== Optional ====
<span class="salmontx">'''subtitle'''</span> - Activates and sets a subtitle line displayed below the '''title'''
; {{fc|green|<nowiki>logo=</nowiki>}}
: '''Values'''
: (optional) Displays a logo to the left of the content
:: Default: n/a, <code>subtitle=''SubtitleHere''</code>
: '''Notes:'''
:* Logos are constrained to a minimum of '''105px''' in width. Images with H > W work best.
:* User should [[Special:Upload|upload logo images]] used in combination with this template to the wiki.
:* If this parameter is left out, then the Step delta logo will be displayed.
: '''How to use:''' <code>logo=<uploadedFileName> or <switch></code> (e.g. <code>logo=Delta_c.png</code> or <code>logo=fo3</code>  )
:: Available switches:
::* fo3
::* fo4
::* fnv
::* nomanssky
::* skyrim
::* skyrimse


; {{fc|green|<nowiki>classList=</nowiki>}}
<span class="salmontx">'''author'''</span> - Activates and sets an author line displayed below the '''title''' or '''subtitle'''
: (optional) This is used to provide a list of classes that are applied to the image.
: '''Values'''
: '''Notes:'''
:: Default: n/a, <code>author=''Author(s)Here''</code>
:* Will only work with classes that are pre-defined and those that work on images.
:* Multiple classes are separated by a blank space.
: '''How to use:''' <code>classList=p-3 rounded-circle</code>


; {{fc|green|<nowiki>subtitle=</nowiki>}}
<span class="salmontx">'''forumtid'''</span> - Activates and sets a forum link for the page. The '''ForumTopicID''' is found in the topic's URL:<br>
: (optional) This is the text that displays for the subtitle.
: {{Fc|dim|<nowiki>https://stepmodifications.org/forum/topic/</nowiki>{{Fc|instruction|'''14917'''}}<nowiki>-system-setup-guide/</nowiki>}}
: '''How to use:''' <code>subtitle=text</code>
: '''Values'''
:: Default: n/a, <code>forumtid=''14917''</code>


; {{fc|green|<nowiki>author=</nowiki>}}
==Examples==
: (optional) field for the author(s)
===Default Call===
: '''How to use:''' <code>author=text</code>
The simplest call returns defaults for the template.
 
: '''Code:''' <code><nowiki>{{PageTitle|title=Title Here}}</nowiki></code>
; {{fc|green|<nowiki>forumtid=</nowiki>}}
: '''Result:'''
: (optional) use a ''forum topic's ID'' to include a link to related forum topic
:: {{PageTitle|title=Title Here}}
: '''Notes:
<hr>
:* The <uniqueForumID> is found in the forum topic's URL:<br>{{Fc|highlight|<nowiki>https://stepmodifications.org/forum/topic/</nowiki>{{fc|yellow|'''14917'''}}<nowiki>-system-setup-guide/</nowiki>}}
<hr>
: '''How to use:''' <code>forumtid=<uniqueForumID></code> (e.g. <code>forumtid=14917</code> )


==Usage Examples==
===Example 01 (all options)===
===Example 01 (all options w/default logo)===
: '''Code:'''
: '''Code:'''
:: <code><nowiki>{{PageTitle|logo=delta|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}</nowiki></code>
:: <code><nowiki>{{PageTitle|logo=delta|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}</nowiki></code>
: '''Result:'''
: '''Result:'''
:: {{PageTitle|logo=delta|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
:: {{PageTitle|logo=delta|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
<br>
<hr>
<hr>
<br>
<hr>


===Example 02 (using switches)===
===Example 02 (alternate logo) ===
: '''Code:'''
: '''Code:'''
:: <code><nowiki>{{PageTitle|logo=fo3|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}</nowiki></code>
:: <code><nowiki>{{PageTitle|logo=fo3|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}</nowiki></code>
:: <code><nowiki>{{PageTitle|logo=nomanssky|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}</nowiki></code>
: '''Result:'''
: '''Result:'''
:: {{PageTitle|logo=fo3|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
:: {{PageTitle|logo=fo3|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
:: {{PageTitle|logo=nomanssky|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
<br>
<hr>
<hr>
<br>
<hr>


===Example 03 ===
===Example 03 ===
Line 88: Line 81:
: '''Result:'''
: '''Result:'''
:: {{PageTitle|logo=delta|title=Your Title Here|author= Team XYZ|forumtid=423}}
:: {{PageTitle|logo=delta|title=Your Title Here|author= Team XYZ|forumtid=423}}
==== Title Only ====
: '''Code:'''
:: <code><nowiki>{{PageTitle|title=Your Title Here}}</nowiki></code><br>
: '''Result:'''
:: {{PageTitle|title=Your Title Here}}
<br>
</noinclude>
</noinclude>

Latest revision as of 22:55, October 4, 2023

Forum Topic

Purpose & Usage[edit source]

Used at top of pages to include a standardized page-title header. Transclusion of this template onto a subpage will preserve the breadcrumb link to the parent root page.

Info-Logo.png

NOTE

This template allows the use of any image uploaded to the wiki. DM an administrator to add an image to this template if it does not exist.

  • The image size minimum for logos is 105x105 pixels. Recommended size is approximately 512x512 pixels, which will be shrunk to fit the template.
  • This template includes the __NOTITLE__ behavior switch by default; therefore, it's not necessary to include it on a page when the PageTitle template is used.

Required Parameters[edit source]

title - Sets the title

Values
Default: n/a, title=TitleHere

Optional Parameters[edit source]

logo - Displays a logo to the left of the content

Values
Default: logo=delta

General Logos[edit source]

Game Logos[edit source]

subtitle - Activates and sets a subtitle line displayed below the title

Values
Default: n/a, subtitle=SubtitleHere

author - Activates and sets an author line displayed below the title or subtitle

Values
Default: n/a, author=Author(s)Here

forumtid - Activates and sets a forum link for the page. The ForumTopicID is found in the topic's URL:

https://stepmodifications.org/forum/topic/14917-system-setup-guide/
Values
Default: n/a, forumtid=14917

Examples[edit source]

Default Call[edit source]

The simplest call returns defaults for the template.

Code: {{PageTitle|title=Title Here}}
Result:
Delta c.png

Title Here



Example 01 (all options)[edit source]

Code:
{{PageTitle|logo=delta|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
Result:
Delta c.png

Your Title Here

Your subtitle text here

by: Team XYZ  | Forum Topic



Example 02 (alternate logo)[edit source]

Code:
{{PageTitle|logo=fo3|title=Your Title Here|subtitle=Your subtitle text here|author= Team XYZ|forumtid=423}}
Result:
Fo3 flare.png

Your Title Here

Your subtitle text here

by: Team XYZ  | Forum Topic



Example 03[edit source]

No Subtitle[edit source]

Code:
{{PageTitle|logo=delta|title=Your Title Here|author= Team XYZ|forumtid=423}}
Result:
Delta c.png

Your Title Here

by: Team XYZ  | Forum Topic