Template:GetBook/Title: Difference between revisions

From The Green Hills Series
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 1: Line 1:
<noinclude><templatedata>
<!--define book and series
-->{{#vardefine:book|{{{1|}}}}}<!--
-->{{#if: {{{2|}}}<!--
--> |{{#vardefine:series|{{{2}}}}}<!--
--> |{{#vardefine:series|1}}<!--
-->}}<!--
-->{{#switch: {{#var:series}}<!--
-->| 1 = {{#switch: {{#var:book}}<!--
--> | 1 = Green Hills and Daffodils<!--
--> | 2 = Green Hills and Dragon Tales<!--
--> | 3 = Green Hills and Fairy Bells<!--
--> | 4 = Green Hills and Holy Wells<!--
--> | 5 = Green Hills and Battlefields<!--
--> | 6 = Green Hills and Whippoorwills<!--
--> | 7 = Green Hills and Prison Cells<!--
--> |}}<!--
-->|}}<!--
--><noinclude>
==Test==
{{GetBook/Title|1|1}}
 
<templatedata>
{
{
"params": {
"params": {
Line 30: Line 51:
}
}
</templatedata></noinclude>
</templatedata></noinclude>
<!--define book and series-->
{{#vardefine:book|{{{1|}}}}}
{{#if: {{{2|}}}
|{{#vardefine:series|{{{2}}}}}
|{{#vardefine:series|1}}
}}
{{#switch: {{#var:series}}
| 1 = {{#switch: {{#var:book}}
| 1 = Green Hills and Daffodils
| 2 = Green Hills and Dragon Tales
| 3 = Green Hills and Fairy Bells
| 4 = Green Hills and Holy Wells
| 5 = Green Hills and Battlefields
| 6 = Green Hills and Whippoorwills
| 7 = Green Hills and Prison Cells
|}}
|}}

Latest revision as of 12:45, 10 March 2023

Test

Green Hills and Daffodils

Returns Book Title Text

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Book Number1 book

Book Number in series

Suggested values
1
Example
1, 2, 3
Numberrequired
Series Number2 series

Series Number

Default
1
Example
1, 2, 3
Numberrequired