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
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@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Mary Ann Davison Sent: Thursday, October 29, 2009 2:26 PM To: mediawiki-l@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@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Doh! That's exactly what I'm trying to do. I misunderstood the <noinclude> purpose. Thank you so very much!!
Maffy
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Daniel Barrett Sent: Thursday, October 29, 2009 11:53 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] noinclude doesn't work
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@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Mary Ann Davison Sent: Thursday, October 29, 2009 2:26 PM To: mediawiki-l@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@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Mary Ann Davison wrote:
According to the documentation, I should be able to reference a template by doing this:
<noinclude>
{{NameOfTemplate}}
</noinclude>
That's not how noinclude tags work. You'd place noinclude tags on the source article to prevent it from being included in any transclusion of that source.
From your description of what you're looking for, I'm pretty sure what you're looking for is [[Template:NameOfTemplate]].
mediawiki-l@lists.wikimedia.org