Rosetta Code:Village Pump/Adding transclusion plugin: Difference between revisions

From Rosetta Code
Content added Content deleted
(Sections page for readability)
(Wanted extension not available)
Line 21: Line 21:
===Current (guesses) conclusions===
===Current (guesses) conclusions===
Current guess is that using the <nowiki>{{header|...}}</nowiki> macro in a section name is preventing the title from being recognized to do the transclusion
Current guess is that using the <nowiki>{{header|...}}</nowiki> macro in a section name is preventing the title from being recognized to do the transclusion
: The extension "Labeled Section Transclusion" isn't available on Rosetta Code. Thus <code>lsth</code> isn't recognized as a parser hook and the whole <code>{{#...}}</code> part is interpreted as normal text. --[[User:AndiPersti|Andreas Perstinger]] ([[User talk:AndiPersti|talk]]) 09:25, 25 September 2015 (UTC)

===Attempted Usage===
===Attempted Usage===
I would like to call:
I would like to call:

Revision as of 09:25, 25 September 2015

Adding transclusion plugin
This is a particular discussion thread among many which consider Rosetta Code.

Summary

Creating a template page which will extract content from existing pages on the fly and present cross-cutting content. For example, a page of all examples in a particular language

Discussion

Likely relevant tasks

I think this is relevant to

  1. Rosetta Code:Village Pump/Download Perl Code
  2. Rosetta Code:Village Pump/Language template enhancements
  3. Rosetta Code:Village Pump/SMW Examples by language and concept

but I'd like to wait until I have a working small example to add to those pages. --Mcint (talk) 08:04, 25 September 2015 (UTC)

MediaWiki support and documentation

MediaWiki:Transclusion has background information and favors one use case,

but it also mentions MediaWiki:Extension:Labeled_Section_Transclusion,

which has a particularly useful section in mw:Extension:Labeled_Section_Transclusion#Transclude_a_specific_section

It says the function can be called as follows:

{{#lsth:pagename|sectionX}}

Current (guesses) conclusions

Current guess is that using the {{header|...}} macro in a section name is preventing the title from being recognized to do the transclusion

The extension "Labeled Section Transclusion" isn't available on Rosetta Code. Thus lsth isn't recognized as a parser hook and the whole {{#...}} part is interpreted as normal text. --Andreas Perstinger (talk) 09:25, 25 September 2015 (UTC)

Attempted Usage

I would like to call:

=={{header|OCaml}}==

from the Pythagorean triples page

not working:

{{#lsth:Pythagorean triples|OCaml}}

{{#lsth:Pythagorean triples|OCaml}}

nor does

{{#lsth:Pythagorean triples|{{header|OCaml}}}}

{{#lsth:Pythagorean triples|OCaml}}