42,805
editsUse an lvar to define a default icon filename, then use it for pageseo
HiddenDragon (talk | contribs) (Adding image/icon fields to cargo) |
HiddenDragon (talk | contribs) (Use an lvar to define a default icon filename, then use it for pageseo) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{{this is an example}}} | <includeonly>{{#lvardef: icon | {{#if: {{{icon|}}} | {{{icon}}} | {{#replace:{{#replace:{{#replace:{{#replace:{{#titleparts: {{PAGENAME}} }}|:|}}|/|<nowiki/> <nowiki/>}}|(|<nowiki/> <nowiki/>}}|)|<nowiki/> <nowiki/>}} Icon.webp }} }} | ||
{{#switch: {{{this is an example}}} | |||
| yes = | | yes = | ||
| #default = {{PageSeo|image = {{ | | #default = {{PageSeo|image = {{#lvar: icon}}|description = {{{seo description|{{{name|{{PAGENAME}} }}} is a {{#ifeq:{{{level}}} | ||
| cantrip | | cantrip | ||
| Cantrip ({{{school}}}) | | Cantrip ({{{school}}}) | ||
Line 268: | Line 269: | ||
| name = {{{name|{{#titleparts: {{PAGENAME}} }} }}} | | name = {{{name|{{#titleparts: {{PAGENAME}} }} }}} | ||
| image = {{{image|}}} | | image = {{{image|}}} | ||
| icon = {{# | | icon = {{#lvar:icon}} | ||
| spell_level = {{#ifeq:{{{level|}}}|cantrip|0|{{{level|}}} }} | | spell_level = {{#ifeq:{{{level|}}}|cantrip|0|{{{level|}}} }} | ||
| spell_school = {{{school}}} | | spell_school = {{{school}}} |