Mobile app version of vmapp.org
Login or Join
Shelley277

: How do I find text rendered using templates in MediaWiki? I'm currently reworking a MediaWiki template that has some semantic design issues: there are two almost exact key/value pairs and one

@Shelley277

Posted in: #Mediawiki #Search #Template

I'm currently reworking a MediaWiki template that has some semantic design issues: there are two almost exact key/value pairs and one of them may be completely removed:

{{Template
| foo1 = bar
...
| foo2 = '''bar'''
...
}}


I'm also removing the foo2 key at the pages that use this template, so I have an idea that some kind of marking may be helpful: I've changed the template source code so it could show a warning that the template usage is currently being reworked:

{{#if: {{{foo2|}}} |
<p style="color: red;">The template is under construction.</p>
}}


So, if the template is used with the foo2 key, then the warning is rendered at the page. That's great.

But as I'm not aware with bots setup or implementation, I have to process the templates manually, and I simply iterate through every page that uses the template using wiki/Special:WhatLinksHere/Template:Template. This is not a reliable way because I may skip a page. Another option I thought was able to work is searching for "The template is under construction". But unfortunately MediaWiki seems to be unable to search for text that is rendered under template transclusions.

Is there any way to find text that's rendered with a template using standard search?

(Bots are not an option in this case unfortunately because of several reasons. My MediaWiki version is 1.19.0)

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley277

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley277

I also posted the same question at the MediaWiki Project Support Desk page, and recently got an answer. They say that adding an auxiliary category is a way to go, however it may require some time to work because of tight cooperation with internal background jobs:

{{#if: {{{foo2|}}} |
<p style="color: red;">The template is under construction.</p>
[[Category:Under construction]]
}}


Hope this helps anyone else too.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme