Jump to content

Editing Guide/Patterns: Difference between revisions

From Joepedia
No edit summary
No edit summary
Line 10: Line 10:


To make this work nicely:
To make this work nicely:
* Make sure to wrap categories on the subpage in <code><nowiki><noinclude><nowiki></code>, otherwise they will get included into the base page. Example: the Yakuza 0 category on [[Japanese_Mispronunciations/Yazooka]], which doesn't make sense on the parent article.
* Make sure to wrap categories on the subpage in <code><<nowiki />noinclude><nowiki></code>, otherwise they will get included into the base page. Example: the Yakuza 0 category on [[Japanese_Mispronunciations/Yazooka]], which doesn't make sense on the parent article.
* Make sure the subpage makes sense if someone comes to it via categories and reads it as a separate page.  
* Make sure the subpage makes sense if someone comes to it via categories and reads it as a separate page.  
** Use <code><nowiki><noinclude><nowiki></code> to add parts that won't be included into the parent page if they are redundant there. Example: the Joeism banner on [[Japanese_Mispronunciations/Sun_Deer]].
** Use <code><nowiki><<nowiki />noinclude></code> to add parts that won't be included into the parent page if they are redundant there. Example: the Joeism banner on [[Japanese_Mispronunciations/Sun_Deer]].
** You can even include parts of the parent page into the subpage, e.g: <code><nowiki>{{#lst:Parent|section}}<nowiki></code> will include that section into the child page (of course make sure this is in a <code><nowiki><noinclude><nowiki></code>). 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 in a <code><<nowiki />noinclude></code>). Example: the explanation on [[Japanese_Mispronunciations/Sun_Deer]].
* If the parent article needs context for the subpage, you can use <code><nowiki><includeonly><nowiki></code> 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> 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]].

Revision as of 17:37, 25 January 2025

Transparent Subpages

In some situations you have something which is small enough it should really just be a section of a larger article, but also it is distinct enough it should really have its own categories, without them all being mixed into the larger article.

The solution to this is to make a subpage for the item, and include it into the larger page, but it needs to be structured right for this to work.

Examples:

To make this work nicely:

  • Make sure to wrap categories on the subpage in <noinclude><nowiki>, otherwise they will get included into the base page. Example: the Yakuza 0 category on Japanese_Mispronunciations/Yazooka, which doesn't make sense on the parent article.
  • Make sure the subpage makes sense if someone comes to it via categories and reads it as a separate page.
    • Use <nowiki><noinclude> to add parts that won't be included into the parent page if they are redundant there. Example: the Joeism banner on Japanese_Mispronunciations/Sun_Deer.
    • You can even include parts of the parent page into the subpage, e.g: {{#lst:Parent|section}} will include that section into the child page (of course make sure this is in a <noinclude>). Example: the explanation on Japanese_Mispronunciations/Sun_Deer.
  • If the parent article needs context for the subpage, you can use <includeonly> 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.