Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

noinclude doesn't work

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


mdavison at mndigital

Oct 29, 2009, 11:25 AM

Post #1 of 4 (230 views)
Permalink
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


danb at VistaPrint

Oct 29, 2009, 11:53 AM

Post #2 of 4 (216 views)
Permalink
Re: noinclude doesn't work [In reply to]

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

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


smcafee at collaborativefusion

Oct 29, 2009, 11:56 AM

Post #3 of 4 (215 views)
Permalink
Re: noinclude doesn't work [In reply to]

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]].

--
Sean McAfee
System Engineer

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


mdavison at mndigital

Oct 29, 2009, 11:56 AM

Post #4 of 4 (214 views)
Permalink
Re: noinclude doesn't work [In reply to]

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[at]lists.wikimedia.org
[mailto:mediawiki-l-bounces[at]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[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

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

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

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.