Last modified: 2012-04-16 09:16:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28095, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26095 - New <transcludeonly> tag to determine what gets transcluded
New <transcludeonly> tag to determine what gets transcluded
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/Help:Te...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-24 06:08 UTC by User:Docu
Modified: 2012-04-16 09:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description User:Docu 2010-11-24 06:08:02 UTC
To make it easier to control what gets transcluded, it could be interesting to have an additional tag "<transcludeonly>".

Sample (1) 

One could create a template:

asdf asdf <transcludeonly>123</transcludeonly> asdf asdf

When transcluded, this would display:

123
Comment 1 p858snake 2010-11-24 06:09:26 UTC
Use <includeonly></includeonly>
Comment 2 User:Docu 2010-11-24 06:15:08 UTC
Not really, a template

asdf asdf <includeonly>123</includeonly> asdf asdf

renders as:

asdf asdf 123 asdf asdf
Comment 3 Maarten Dammers 2010-11-24 08:52:02 UTC
"<onlyinclude>123</onlyinclude> asdf asdf" gives "123" when transcluded. This seems to be exactly what you want.
Comment 4 p858snake 2010-11-24 09:10:24 UTC
Related documentation about it: http://www.mediawiki.org/wiki/Includeonly#Control_template_inclusion
Comment 5 User:Docu 2010-11-24 12:53:09 UTC
Thanks Maarten, I thought this somehow existed, but couldn't find it.

Good to read that p858snake plans to document it. I would appreciate if he would write this differently though. I find his posts in this bug highly confusing.
Comment 6 Phillip Patriakeas 2010-11-25 01:26:57 UTC
On the other hand, it would be useful to have some tags to allow stuff to be included only when the template is transcluded, or only when substituted (and the inverse, of course), but that would be a different bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links