Of course, having two templates like you said is a possibility (and perhaps the 
optimal way).

It still has a downside, however – people have to remember that in certain 
scenarios you have to use a special template (even though the common one will – 
confusingly – appear correct on the page where you configure the editnotice 
etc.).

Anyway, thanks for the answer.
Marcin
________________________________
From: Thiemo Kreuz <[email protected]>
Sent: Friday, November 29, 2024 3:11:21 PM
To: Wikitech-l <[email protected]>
Subject: [Wikitech-l] Re: Checking if template is rendered outside page content

I don't think this is possible, sorry. Why not have a special template
for use on special pages? Making code more complicated just to avoid
"duplication" sounds like something we discuss in software development
all the time – and typically try to avoid.

The two templates can still share most of their code, e.g. the special
one can call the normal one and add the mentioned mw-parser-output
wrapper.

Kind regards
Thiemo
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to