mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 19:09:29 +00:00
c8536f1a71
There are 2 situations: 1. Either the template name is used in a [[…]] link. In this case we must provide the namespace. MWTemplateModel.getTitle() does this. However, it's not a mw.Title object and therefor not really guaranteed to be a valid title. This is fine. The worst thing that can happen is that the link points to an error message. But this should be entirely unreachable anyway. 2. Some messages want to display the name of the template. Ideally without the namespace. That's what MWTemplateSpecModel.getLabel() is for. Again this is not guaranteed to be a valid mw.Title. But it doesn't need to. It's only used as a label. Change-Id: I03d0481201620a2f5c444ee32b656bcaade98aac |
||
---|---|---|
.. | ||
ve.dm.MWImageModel.js | ||
ve.dm.MWParameterModel.js | ||
ve.dm.MWTemplateModel.js | ||
ve.dm.MWTemplatePlaceholderModel.js | ||
ve.dm.MWTemplateSpecModel.js | ||
ve.dm.MWTransclusionContentModel.js | ||
ve.dm.MWTransclusionModel.js | ||
ve.dm.MWTransclusionPartModel.js |