Page MenuHomePhabricator

Namespacing templates
Closed, ResolvedPublic

Description

Currently two extensions could register the following RL modules

'ext.foo' => array(
'templates' => 'common.template'
);

'ext.bar' => array(
'templates' => 'common.template'
);

Both would be registered as common.template, e.g name of template would be registered based on filename, and cause the throwing of an exception.

( On the JavaScript side we call
mw.mantle.template.get( 'common.template' ) - this would not know which template to use.)

We should namespace these templates better

e.g.

mw.mantle.template.get( 'ext.foo/common.template' )
mw.mantle.template.get( 'ext.bar/common.template' )


Version: unspecified
Severity: normal

Details

Reference
bz69916

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:36 AM
bzimport set Reference to bz69916.
bzimport added a subscriber: Unknown Object (MLST).

Is there any point keeping this open given T85890?

Jdlrobson claimed this task.

Templating in core has this support.