Rosetta Code:Village Pump/Adding transclusion plugin

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

Summary

Suggestion to add an existing mediawiki plugin, Transclusion, to address other village pump topics

Discussion

Relevant vp-topics

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

MediaWiki support and documentation

Transclusion is the inclusion of content by reference. MediaWiki has a plugin for it, which would be ready for use in RosettaCode thanks to consistent use of headers per-programming language, through the header-based transclusion command it adds to wiki markup.

The plugin is not currently installed, according to the Special:Version page.

--Mcint (talk) 05:51, 5 December 2015 (UTC)

Transclusion scratch space

It says the function can be called as follows:

{{#lsth:pagename|sectionX}}

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. Also not working:

{{#lsth:Pythagorean triples|OCaml}}

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

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

{{#lsth:Pythagorean triples|OCaml}}