[Mediawiki-l] noinclude doesn't work

Daniel Barrett danb at VistaPrint.com
Thu Oct 29 18:53:17 UTC 2009


Do you just want to produce a link to the template?  Then use:

[[Template:NameOfTemplate]]

The <noinclude> tag does not prevent templates inside it from evaluating.  It marks a region of the article that should not be transcluded into OTHER articles.

A quick example. You have a template T and article A.  In template T, you write:

Hello <noinclude>world</noinclude>

When you render Template:T by itself, you see "Hello world"

In article A you write:

{{T}}

When article A is rendered, you see only "Hello". Because you told template T not to permit "world" to be transcluded into other articles.

DanB

-----Original Message-----
From: mediawiki-l-bounces at lists.wikimedia.org [mailto:mediawiki-l-bounces at lists.wikimedia.org] On Behalf Of Mary Ann Davison
Sent: Thursday, October 29, 2009 2:26 PM
To: mediawiki-l at lists.wikimedia.org
Subject: [Mediawiki-l] noinclude doesn't work

According to the documentation, I should be able to reference a template
by doing this:

 

<noinclude>

{{NameOfTemplate}}

</noinclude>

 

But Mediawiki is transcluding the template into the page and I don't
want it there.  I just want developers to be able to click the template
and grab the template text when they're creating a new article.

 

Is there a setting in LocalSettings.php that I need to make to get
<noinclude> to work?  Someone else here installed the software, so I
haven't worked with that file, yet.

 

Anyone else have this problem?

 

Thanks,

Maffy

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



More information about the MediaWiki-l mailing list