2

I am trying to create a template that adds the page to a category (in a second step also a short header text) but I fail succeeding. Right now I have the following:

<noinclude>This is a template to mark articles that needs an update. All these articles are listed under {{:Category:Articles that needs update}}</noinclude>
<includeonly>{{Category:Articles that needs update}}</includeonly>

This does not tag the page with the wanted category and the category-page does not contain any link to the category in question.

  • @ale: When should I use the template-tag and when should I not? – Fredrik C Feb 26 '18 at 12:13
  • template seems too generic to me. If you look at the questions with that tag it is used with a ton of different web apps. I don't know that there are enough questions about templates in Mediawiki to justify a mediawiki-templates, but it may not be unreasonable. I note we already have wikipedia-templates. – ale Feb 26 '18 at 15:26
  • Sounds reasonable, I suggest it to be removed then. Thank you! – Fredrik C Feb 26 '18 at 16:26
4

Square brackets instead of braces.

<noinclude>This is a template to mark articles that needs an update. All these articles are listed under [[:Category:Articles that needs update]]</noinclude>
<includeonly>[[Category:Articles that needs update]]</includeonly>
  • The template works but does not do what I want. It adds the category to the page I include the template in, but when visiting the category, it lists no pages. Is there a solution to this or should I be doing this in another way? – Fredrik C Feb 26 '18 at 12:16
  • It seems to be working but with a delay, the page did not appear within some minutes, some hours later it worked! – Fredrik C Feb 26 '18 at 16:29
  • 1
    Was the cached version. To referesh the page, click edit, change edit at the end of the url to purge and enter. – Rob Kam Feb 26 '18 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.