ArrowHead294 (talk | contribs)
ArrowHead294 (talk | contribs)
Line 33: Line 33:
Could you plz explain what problem is solved by changes like [https://en.xen.wiki/index.php?title=Template:Inaccessible&curid=15693&diff=171378&oldid=167252 this]? Thanks in advance. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 15:04, 17 December 2024 (UTC)
Could you plz explain what problem is solved by changes like [https://en.xen.wiki/index.php?title=Template:Inaccessible&curid=15693&diff=171378&oldid=167252 this]? Thanks in advance. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 15:04, 17 December 2024 (UTC)
: Often times, what'll happen if you put categories inside of an <code>&lt;includeonly&gt;</code> tag on a template and then show it on the documentation page, is that the categories will show up on the template page itself despite the tags. The stuff inside the <code>&lt;includeonly&gt;</code> tags will be visible on the transcluded page, and the template will be put into categories it's not meant to be in.
: Often times, what'll happen if you put categories inside of an <code>&lt;includeonly&gt;</code> tag on a template and then show it on the documentation page, is that the categories will show up on the template page itself despite the tags. The stuff inside the <code>&lt;includeonly&gt;</code> tags will be visible on the transcluded page, and the template will be put into categories it's not meant to be in.
: My idea is to explicity check the name of the template (including the Template namespace), and include the category if it's not on the documentation page or the template page. This way, the template doesn't get put into the wrong categories, since (for example) [[Template:Who]] and its associated documentation page themselves don't go inside [[:Category:Pages with unattributed statements]]. [[User:ArrowHead294|<math>\overrightarrow{\,\,\scriptsize\text{ArrowHead294}\,\,\,}</math>]] [[User talk:ArrowHead294|(speak to me)]] 15:11, 17 December 2024 (UTC)
: For example, on [[Template:Who]], if [[:Category:Pages with unattributed statements]] had just an <code>&lt;includeonly&gt;</code> tag without the <code>#if:</code> statement, the template and its associated documentation page would get put inside the category even though they themselves aren't supposed to be there.
: The <code>#if:</code> statements I've added explicity check the name of the page (including the Template namespace) in order to exclude the tcategory from its page and the associated documentation. [[User:ArrowHead294|<math>\overrightarrow{\,\,\scriptsize\text{ArrowHead294}\,\,\,}</math>]] [[User talk:ArrowHead294|(speak to me)]] 15:11, 17 December 2024 (UTC)