function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brandon Chang 9Brandon Chang 9 

Can you add a template hero component to a custom theme layout?

Several of the community templates include hero components.  

Due to client requests, we will eventually move to a custom theme layout.  Instead of recreating a hero component, template header, template navbar, etc. is there a way to add template aura components to a custom theme layout?
Madhavi Ramanujan 17Madhavi Ramanujan 17
We exactly have the same requirement. Did you find any solution? Please let us know!
Prateek Prasoon 19Prateek Prasoon 19
Yes We can.
Use like this 
  <aura:attribute name="themeHero" type="Aura.Component[]" required="false"/>

Example:
 
<aura:component implements="forceCommunity:themeLayout" access="global" description="Sample Custom Theme Layout">
    <aura:attribute name="search" type="Aura.Component[]" required="false"/>
    <aura:attribute name="profileMenu" type="Aura.Component[]" required="false"/>
    <aura:attribute name="blueBackground" type="Boolean" default="false"/> 
    <aura:attribute name="smallLogo" type="Boolean" default="false" />
    <aura:attribute name="navBar" type="Aura.Component[]" required="false"/>
    <aura:attribute name="newHeader" type="Aura.Component[]" required="false"/>
    <aura:attribute name="newFooter" type="Aura.Component[]" required="false"/>
    <aura:attribute name="themeHero" type="Aura.Component[]" required="false"/>

    <div>
        
        <div class="newHeader">
            {!v.newHeader}
        </div>
        <div class="themeHero">
            {!v.themeHero}
        </div>
        <div class="mainContentArea">
            {!v.body}
        </div>
        <div class="newFooter">
            {!v.newFooter}
        </div>
    </div>
</aura:component>






 
Derek Haworth 6Derek Haworth 6
Has anyone figured out how to add the cart badge/button to a custom theme layout as well?