Page MenuHomePhabricator

Include path for templates
Closed, DeclinedPublic

Description

Author: Bernhard.Fastenrath

Description:
Include path for templates: A set of pages (e.g. a Wikibook or Wikiversity course) may share the same local templates. It is currently not possible to make the required templates sub-pages of one page and to allow the other pages to access them conveniently.

Example:
A page "Mentoring Handbook/Chapter 1" would have refer to "Mentoring Handbook/LocalTemplate"
instead of setting INCLUDE_PATH="Mentoring Handbook/" and referring just to "LocalTemplate".


Version: unspecified
Severity: enhancement

Details

Reference
bz11361

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:00 PM
bzimport set Reference to bz11361.
bzimport added a subscriber: Unknown Object (MLST).

matthew.britton wrote:

You can back up a subpage level by adding two periods (..) to the front of the title -- so adding {{../LocalTemplate}} to [[Mentoring Handbook/Chapter 1]] would transclude [[Mentoring Handbook/LocalTemplate]].

Does this solve your problem?

Bernhard.Fastenrath wrote:

It would solve my problem, but both {{:../quote}} and {{../quote}} fail to include my template.

mike.lifeguard+bugs wrote:

There's no need for local templates at all. Put them in the Template namespace; *that's what it's for*. Alternatively, use the full path: {{Mentoring Handbook/LocalTemplate}}. I suspect the developers will WONTFIX this since this is a request for pointless functionality (if I'm understanding the request properly), but I'll let them handle the fields.

A 'template path' of this sort leads to obvious problems with conflicts; eg ordering, where does the link point, etc. We have similar issues already with images and shared repositories, but in a much more restricted case.

I'd tend to agree for now that just using the full name of the template should be quite sufficient.