Talk:Transclusion

Afterthought
I think I should have created this page in the  namespace. (Anyway, it's in the default searchpath here.) Well, an admin might fix it.--Imz 19:16, 26 August 2007 (UTC)

Transclusion restriction
Is there a way i can create a page and then when i transclude it onto another page....i only want the top 3 results. Similar to doing a transclusion of the Recent Changes special page. --Goldbishop 15:48, 20 July 2010 (UTC)

Limiting Category Transclusion
Please point me in a better direction if there is one.

I'm trying to find a way to limit category transclusion such that a page created by a template is categorized, but if that page is then transcluded to another page via another template, the category is NOT. So far, by various placement of the and 's, I've gotten the categorization to jump around including categorization of the template itself instead of the page.

What I CAN do is if I edit the page generated by the template and add to it the to the end of it, THEN that page will be categorized, but it won't be when it is transcluded.

My question: is there any way to enable a template to push to a page without acting on it, such that the rest of the template works and the resulting page is categorized, but when it is transcluded, the  is recognized? I feel like I'm missing something. --Glitch25 22:48, 17 March 2011 (UTC)

Transclude Entire pages into another separate wiki
Hello, I would like to have pages in my wiki that are totally identical to certain pages in Wikipedia.org. I am including these pages as a convenience to my readers so they know what work has already been done on the subject.

Would transclusion do the job? What would be code?

--Ali.T 1:48 AM, Dec 1 2011 IRST

Partial transclusion
A version of Transclusion is also at w:en:Wikipedia:Transclusion. The problem with syncing articles and subpages has previously been discussed (Wikipedia talk:Summary style, Wikipedia:Village pump (technical) Wikitech-l). Has this been previously discussed here? Is this something that can be addressed in /trunk/extensions? I couldn't find anything obviously related on the Bug tracker, so will add something there, pointing here. Thanks for reading. -- Trevj (talk) 12:22, 7 February 2012 (UTC)

Transclude only the name of the last contributor or author?
Hello! I am trying to determine how to transclude JUST the last contributor of a page or the author of the page. So in a template maybe that says "Under Construction" I would like to have something like a "variable call" or maybe more appropriately a "database call" that would output the name of the page author or the last contributor ... so that the page that is actually under construction uses which would then somehow on the actual page, show the last editor or author of that page, not the template, so for example if the last contributor of the under construction page was Bob but the last contributor of the  template was Tom, I would want the page which is under construction to show Bob when you transclude the template into the page. A good example of this can be seen at

Does anybody know of the code bit that would do this? I'm pretty sure it's very simple, but Google search, and mediawiki search, are failing me today.

--Dehvokahn 14:24, 8 Aug 2014 (EDT)


 * You're probably looking for . That always shows the very last editor of the page, though, so if someone other than the original author puts the Under Construction template on the page, it'll be their name that shows up. You can try and get fancy by using substitution, but honestly, I usually find it's more reliable to just add a parameter to the call so you know with certainty what'll show up. So your template might look something like   and then you'd call it with  . – RobinHood70 talk 00:50, 9 August 2014 (UTC)

Something seriously wrong with section
I think vandalism made its way into this section: Transclusion. It reads nonsensically. And if it wasn't vandalized, then it needs to be rewritten, because the instructions are incoherent. WinterSpw (talk) 23:21, 1 March 2017 (UTC)


 * It's not well-explained, but it's correctly written as is (give or take the bit about not renumbering...I'm not sure what that was all about). The short of it is: surround the section you want to transclude with &lt;onlyinclude> and &lt;/onlyinclude> tags, then transclude that page normally. – Robin Hood  (talk)  03:21, 3 March 2017 (UTC)

Templates with sections
Dear everybody, I'd appreciate some help about handling sections in templates. In a certain wiki installation, I have a template section. Its content is

==section==

Its function ist to grant for uniform, changeable headlines. The problem is: If a section headline is produced with the template, it does not offer the edit-link for the section. If I reproduce the issue, another problem arises: the edit-link is displayed, but if I follow it, I end up in the template instead of the article where it is included. So, is there a way to grant for a link that directs the user to editing the section produced with the template rather than to the template? Thank you in advance! Yours, Ciciban (talk) 10:25, 13 March 2017 (UTC)

[ [ ] ]
 * The closest you can get is to add your own edit link to the template, but even that'll only add a full-page edit, not a section edit, since there's no built-in way to ask MediaWiki what section you're in. That code would look like this:
 * {{Pre2| [ [{{fullurl:{{FULLPAGENAME}}|action=edit}} ] ]

section
}}
 * – Robin Hood  (talk)  22:34, 13 March 2017 (UTC)

how to I use Transclusion to make the entire content of a template be added to a page?
how to I use Transclusion to make the entire content of a template be added to a page? I know there is a command with I add at:

Moscowamerican (talk) 14:11, 21 July 2017 (UTC)
 * Found it: Help:Substitution Moscowamerican (talk) 14:12, 21 July 2017 (UTC)

Transclusion in namespaces
Hi All,

I am looking at adding a template to all the pages on the User: namespace, can this be done using the namespace, or does the template need to be added to each individual page? Squeak24 (talk) 11:53, 30 November 2017 (UTC)
 * I think what you're looking for is an edit notice. For User space, you would add the template to MediaWiki:Editnotice-2 . If you want to do User talk space, you'd add it to MediaWiki:Editnotice-3 . – Robin Hood  (talk)  17:09, 30 November 2017 (UTC)

Is it possible to transclude a specific version of a page?
If I load an older revision of a page it will show the current transcluded content. Is there any way to transclude a specific version of a page to keep both pages synchronized without losing transclusion entirely? --CptTwinkie (talk) 22:33, 11 September 2018 (UTC)

>> I have the exact same question! I'm attempting to assemble a "book" article that is an assemblage of transcluded content from several different wiki articles, which are each version controlled with the ApprovedRevs extension. The transcluded content DOES include only the latest "approved" version of a page, so you can control what is transcluded with ApprovedRevs. However, for "older" versions of the "book", it would be nice to transclude the content of the articles that were "baselined" at the time of the first book publishing. Is there a template or could there be a template that provides transclusion of content from a specific version of a wiki article? Skunkmantrek (talk) 12:54, 1 October 2018 (UTC)

Sexist writing in the example
Can we remove the bit about a man with seven wives from the example? Simsong (talk) 12:13, 13 June 2019 (UTC)

Transclude and API
Is there a way to transclude the 3 last recent changes AND configure the way they are displayed? I mean transclude and use the API (rcprop)? — Preceding unsigned comment added by Victorwiki82 (User talk:Victorwiki82 • Special:Contributions/Victorwiki82) 15:20, 6 November 2019 (UTC)

Possible to exclude a template for further transclusions ?
I have a page A with a template

I'd like to transclude A into a page B, but without the content of

Is there a way to do that ?

--Varlin (talk) 21:32, 7 July 2021 (UTC)
 * Yes. This is what the  tags are meant to help with. See Help:Transclusion for more information. --BDavis (WMF) (talk) 23:13, 7 July 2021 (UTC)
 * Yes but if I put  in my template code, I do not have "SAMPLE" included on page A. I'd like that it be included in page A, but not in page B. Maybe it can be done by some sort of nesting noinclude tags, but I can't manage to do that. --Varlin (talk) 13:44, 11 July 2021 (UTC)
 * If I'm understanding the problem, you have three pages involved in the setup: A, B, and Template:Header. You would like to see the Template:Header content when viewing A directly. You would also like to see the content of A when viewing B directly, but with the Template:Header content excluded. This would be possible if the wikitext of A wraps its transclude of Template:Header in  tags. I have made a basic example of the 3 pages to demonstrate this. --BDavis (WMF) (talk) 17:00, 11 July 2021 (UTC)
 * Yes you got it, sorry my first sentence was equivocal indeed. I really appreciate your help. Unfortunately in my case, I can't have a "manual" workaround, because I have a series of "page A", whose content is generated by a template. So the only way would be if this template could add a  tag onto page A. But it seems that is just not possible... --Varlin (talk) 23:16, 12 July 2021 (UTC)
 * I have been wrestling withthis as well. My solution/work around is this: Page A_text = text of A. A =  . B = (other things)  .  Put links various places that are helpful for getting to A, A_text, and B. I use various bullets and symbols for hidden links of convenience. — Preceding unsigned comment added by 2601:681:4201:1860:5d0c:a206:2803:1377 (User talk:2601:681:4201:1860:5d0c:a206:2803:1377 • Special:Contributions/2601:681:4201:1860:5d0c:a206:2803:1377) 21:31, 22 July 2021