Template:Documentation: Difference between revisions
Template page
More actions
use titleparts to transclude Template:Foo/doc instead of Template:Foo/sandbox/doc when called from Template:Foo/sandbox |
add ifexist for subpages with unique docs |
||
| Line 4: | Line 4: | ||
|1 = {{#if:{{{1|}}} | |1 = {{#if:{{{1|}}} | ||
|{{{1}}} | |{{{1}}} | ||
|{{# | |{{#ifexist:{{SUBJECTPAGENAME}}/doc | ||
|{{SUBJECTPAGENAME}}/doc | |{{SUBJECTPAGENAME}}/doc | ||
|{{#if:{{#titleparts:{{SUBJECTPAGENAME}}|-1}} | |||
|{{#titleparts:{{SUBJECTPAGENAME}}|-1}}/doc | |||
|{{SUBJECTPAGENAME}}/doc | |||
}} | |||
}} | }} | ||
}} | }} | ||