Mediawiki 1.16: Template documentation example usage?

Something like the following should do the trick. Wrap the categorization in your template inside a parserfunction.

Something like the following should do the trick. Wrap the categorization in your template inside a parserfunction: {{#ifeq: {{NAMESPACE}} | Help || Category:Some_Category }} This sets the category when the template is transcluded onto a page that is not in the "Help" namespace.

Namespace checking is a good idea. I didn't know we could do that so easily. – Keikoku Apr 29 at 13:06.

Another option is to allow a parameter such as demo to avoid including the category. If you don't mind being slightly cryptic, you could do the category in the template as {{{cat|Category:Some_Category}}}; then specifying the parameter as {{my template|cat=}} will prevent the category inclusion.

That works, though in general additional arguments probably would get a little confusing for the general user (unless, of course, I don't mention it in the template! ) – Keikoku Apr 29 at 13:06.

. I am assuming here that you want to show a template "in action" on a documentation page - without attaching some categories (those categories the documentation page usually attaches to articles using this template) to the documentation page.So Category:Some_Category will not do the job - as the template is in fact included. Right?

Try passing a parameter categorize=false to the template to indicate that categories are not to be attached in this case: {{#ifeq:{{{categorize|}}}|false||Category:Some_Category}} The double pipe after "false" means: if(categorize==false) then (empty), else Category:Some_Category - i.e.It is an equivalent construction for if(NOT(categorize==false))... Good luck and thanks for all the fish, Achim.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions