Sometimes we need to put a View inside another View. A good example is the Icon class which sometimes gets embedded in a template using
```
{{{icon}}}
```
And sometimes as
```
{{#fooIcon}}{{>icon}}{{/fooIcon}}
```
We need a consistent way of embedding these. Right now the existence of two ways causes confusion in code review.
= Developer notes
We discussed this in the CR session on 17th August 2017
As @pmiazga rightly pointed out in the [[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.talk.overlays/TalkOverlay.js | TalkOverlay ]] we create views in 3 different ways - template data e.g. [[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.talk.overlays/TalkOverlay.js#L42 | headerButtons ]] raw HTML (e.g.[[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.talk.overlays/TalkOverlay.js#L38 | heading ]]), using templatePartials and passing the options of a View class ([[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.talk.overlays/TalkOverlay.js#L46 | footerAnchor ]]).
There's also a 4th way ([[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/7cbbe20cc79bc52f895427ab3d2761c171a27224/resources/mobile.startup/Section.js#L39 | toHtmlString ]])
The ability to use template partials adds to this problem. We should standardise on one approach and stick to it.
Related: T149909