Template:Format release: Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq:{{#cargo_query:
<!-- DOESN'T WORK. ALWAYS SHOWS AS IF SONGS -->
{{#if:{{#cargo_query:
tables=songs, albums, releases
tables=songs, albums, releases
|fields=IF(songs._ID IS NULL, "album", "song")=type
|fields=IF(songs._ID IS NULL, "album", "song")
|where=songs._pageTitle = "{{{1|Today}}}" OR albums._pageTitle = "{{{1|Today}}}"
|where=songs._pageTitle = "{{{1|Today}}}" OR albums._pageTitle = "{{{1|Today}}}"
|join on=releases._pageName = songs._pageName, releases._pageName = albums._pageName
|join on=releases._pageName = songs._pageName, releases._pageName = albums._pageName
|limit=1
|limit=1
}}|song|{{#ifeq:{{{2|}}}|bold|"'''{{{1}}}'''"|"{{{1}}}"}}|{{#ifeq:{{{2|}}}|bold|'''''{{{1}}}'''''}}}}
|format=
}}|{{#if:{{{2|}}}|"'''[[{{{1|Today}}}]]'''"|"[[{{{1|Today}}}]]"}}|{{#if:{{{2|}}}|'''''{{{1|Today}}}'''''|'''{{{1|Today}}}'''}}}}
<noinclude>
<templatedata>
{
"params": {
"1": {
"label": "Page title",
"type": "wiki-page-name",
"required": true
},
"2": {
"label": "Bold?",
"description": "Set this to show the title in bold formatting.",
"type": "boolean",
"autovalue": "0",
"suggested": true
}
},
"description": "Formats a title based on whether it refers to an album or a song.",
"paramOrder": [
"1",
"2"
]
}
</templatedata>
</noinclude>

Latest revision as of 05:55, 29 November 2021

"Today"

Formats a title based on whether it refers to an album or a song.

[Edit template data]

Template parameters

ParameterDescriptionTypeStatus
Page title1

no description

Page namerequired
Bold?2

Set this to show the title in bold formatting.

Auto value
0
Booleansuggested