Thread:Project:Support desk/How to make a template generate working onlyinclude tags on the referring page

Hi,

I am searching now for hours for a solution for the following problem: I have a template (let's call it slave) that is used in another template (master). The master is then again used on other pages. The need I have is that the slave will generate an onlyinclude tag that is parsed in the master template.

I tried various variants of hiding the onlyinclude tag in the slave, and they mostly worked fine in that the tags were not parsed in the slave. But in the master the result always is that it will just display as plain text, i.e. " s-before between s-after ", but won't have the effect that only "between" will be used in pages referring to the master.

To make it more undestandable:

The master source code should look like this:

 m-before {{slave|parameter}} m-after

And the result displaying when calling the master page should then show "m-before s-before between s-after m-after", but when embedded in another page just "between". However, current solution will only have the result that the result shown is " m-before s-before between s-after m-after ", both in the master and in the pages that call it.

I hope this is somewhat understandable. If not, please ask!

Any ideas how to accomplish that?