2

I'd like to create basic template to inherit this template for all apps in my org:

<aura:component isTemplate="true" extends="aura:template">
    <aura:set attribute="title" value="Aura Notes"/>
    <div class="container">{!v.body}</div>    
</aura:component>

But title should be set outside template, as well as body. What is the right way to do this.

I am trying to do like this but it doesn't work. Custom component is not rendered inside .container element:

<aura:application template="c:template">
    <aura:set attribute="title" value="Aura Notes"/>
    <c:customCmp/>        
</aura:application>
3

Templates have very specific restrictions/limitations and are used to generate the initial application HTML document sever side - the only place in Lightning Components where server side HTML generation/rendering is used today. This is the "bootstrapping" part of the lifecycle and is meant primarily to allow you to customize the splash/background of your app before the framework has initialized.

Looking at your example I believe what you really want is a base application that you then extend instead of using a template.

  • Doug, are there any examples of how a template would customize the splash/background of an app? – techbusinessman Mar 23 '17 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.