Last modified: 2009-02-10 23:54:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3911 - Ability to transclude only part of a page
Ability to transclude only part of a page
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 14724
  Show dependency treegraph
 
Reported: 2005-11-08 20:00 UTC by Eric Newton
Modified: 2009-02-10 23:54 UTC (History)
2 users (show)

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


Attachments

Description Eric Newton 2005-11-08 20:00:23 UTC
Is there some way to mark text in a page as "named/exportable"?

For instance, on the memory-alpha.org wiki,(a wiki for the Star Trek universe),
there needs to be a way to pull the Episode descriptions into Episode listing pages.

To do that, the actual episode page would need certain pieces of information to
be named and exportable by some format.  To reference this exportable text,
another article could use a link similar to templates {{page_name:exportedTextName}}
Comment 1 Eric Newton 2005-11-08 20:06:37 UTC
I guess the page exporting the text would need some kind of wiki-fied markup:

for example on http://memory-alpha.org/en/wiki/Demon (an episode of Voyager), in
the source text we'd have
{{description=''Voyager'', desperately low on fuel, finds deuterium on a highly
hostile "Demon class" planet.}} 

...and would render as...

Voyager, desperately low on fuel, finds deuterium on a highly hostile "Demon
class" planet.

...and then the listing page http://memory-alpha.org/en/wiki/VOY#Season%204

*[[Demon]]: {{Demon:description}}

...which would render as...

*Demon: Voyager, desperately low on fuel, finds deuterium on a highly hostile
"Demon class" planet.

and wouldn't de-ref the actual description into the page text.
Comment 2 Eric Newton 2005-11-08 20:08:03 UTC
oops that Season 4 link should be:
http://memory-alpha.org/en/wiki/VOY#Season_4
Comment 3 Rowan Collins [IMSoP] 2005-11-09 18:47:54 UTC
Firstly, I'm changing the summary, because I don't see the sense in which this
is "reversing" anything. I've tried to sum up the solution you're proposing,
rather than the problem, since this is a feature request.

Secondly, what you're describing sounds a little bit like [[meta:Wikidata]], in
that it involves storing a kind of key-value pair separate from but attached to
the article. But that's still a very long way from implementation, so is
probably best forgotten for now.

Thirdly, I think there are ways of creating the desired effect with the current
software - none of them great, but all feasible. For instance:
* wrap the entire article, except for the summary sentence, in "<noinclude> ...
</noinclude>" sections; this only allows you one section to transclude, and is
probably rather inefficient, but would mean that {{:Demon}} would show only the
summary
* store the summary in a separate page ("Template:Demon summary",
"Demon/summary", or somesuch), and use the standard syntax to include it onto
both pages - that is, put {{Demon summary}} or {{:Demon/summary}} on both
"Demon" *and* "VOY"

Nonetheless, the idea of editting a section as part of the page, but storing it
separately (for reference elsewhere) is an interesting one, and would also be an
interesting approach to the "threaded wiki"/"LiquidThreads" discussion system
[see recent wikitech-l discussions]...
Comment 4 Ævar Arnfjörð Bjarmason 2005-11-09 18:49:52 UTC
(In reply to comment #3)
> * wrap the entire article, except for the summary sentence, in "<noinclude> ...
> </noinclude>" sections; this only allows you one section to transclude, and is
> probably rather inefficient, but would mean that {{:Demon}} would show only the
> summary

It makes much more sense to wrap only the summary sentence in <onlyinclude>
which would have the same effect, that only works in HEAD though.
Comment 5 Rowan Collins [IMSoP] 2005-11-09 19:13:36 UTC
(In reply to comment #4)
> It makes much more sense to wrap only the summary sentence in <onlyinclude>
> which would have the same effect, that only works in HEAD though.

Ah, I wasn't aware that such a keyword existed; obviously this would be exactly
when you'd want it.
Comment 6 Eric Newton 2005-11-10 18:44:48 UTC
Yeah, that notation of <nowiki>{{:Demon}}</nowiki> would work, and I appreciate the 
suggestion.  Unfortunately, its like taking a sledge hammer to a hang a picture on the wall.

Could this [[http://meta.wikimedia.org/wiki/Talk:Wikidata#A_minimalist_approach|minimalist 
approach]] work sooner and pave the way for this improved data handling?

I hope it could be... the benefits of having this meta-data alongside the page, (even slightly 
unstructured for the time being) could really begin push the wiki vision even further than I 
even imagined...!
Comment 7 Steve Sanbeg 2008-08-05 21:25:39 UTC
If you only need one marked section, then marking it with <onlyinclude> and transcluding like {{:demon}} should be exactly what you want.  If you want different sections with different names, then you can use the labeled section transclusion extension, which is used for that purpose on wikisource, etc. i.e.

<section begin='Voyager'/>, desperately low on fuel, finds deuterium on a highly hostile "Demon class" planet.<section end='Voyager'/>


{{#include:Demon|Voyager}}

 

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


Navigation
Links