Board Thread:Support Requests - Getting Technical/@comment-34918040-20200618220700

Hi,

in our wiki asphalt.fandom.com we have several pages that are categorized by a template, depending on the page name. Reduced example:

Template : Is inserted on a single page named "2020 Page" with. The names of all pages containing start with a year.

Wikitext :

This categorizes in "2020" if the page name is the same as  when the page is saved.

However, the single pages are also displayed dynamically (with ) within other "meta" pages if they have the category "2020". As is now on a metapage whose name is not the same as , the #if statement prevents this metapage from getting all the categories of the contained single pages – at least this was the plan.

In reality all single pages unfortunately lose their categories as soon as they are listed on a metapage. Apparently, is parsed again on the metapages, and as the metagepage name doesn't match , there is not only no categorization for the metapage (correct), but the categorizations of the contained single pages are even reverted (unwanted).

I'd like to have that
 * categorizes all single pages in which it is inserted
 * does NOTHING if those single pages containing are transcluded a second time.

Can anybody help me there?

The template method was chosen to be able to add other categories later. 