Editing Guide/Patterns: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
** You can even include parts of the parent page into the subpage, e.g: <code>{<nowiki />{#lst:Parent|section}}</code> will include that section into the child page (of course make sure this is wrapped in <code><<nowiki />noinclude></code> tags). Example: the explanation on [[Japanese_Mispronunciations/Sun_Deer]]. | ** You can even include parts of the parent page into the subpage, e.g: <code>{<nowiki />{#lst:Parent|section}}</code> will include that section into the child page (of course make sure this is wrapped in <code><<nowiki />noinclude></code> tags). Example: the explanation on [[Japanese_Mispronunciations/Sun_Deer]]. | ||
* If the parent article needs context for the subpage, you can use <code><<nowiki />includeonly></code> tags to have parts that don't appear when you are on the subpage itself, like a subtitle for the section. Example: the title on [[Japanese_Mispronunciations/Sun_Deer]]. | * If the parent article needs context for the subpage, you can use <code><<nowiki />includeonly></code> tags to have parts that don't appear when you are on the subpage itself, like a subtitle for the section. Example: the title on [[Japanese_Mispronunciations/Sun_Deer]]. | ||
* If making links to the section/subpage, use <code>{<nowiki />{EmbeddedSubpageLink|Parent|Subpage}}</code> to link to it, this will link to the section, unless you are *on* the subpage, where it'll be a self-link. This makes it work nicely in navboxes and the like where you want it to be a self-link for clarity they are on that page. |