How use Company Logo and Header Image in my custom community layout? I trying add this logo before my custom navigation menu.

enter image description here

this is my custom layout:

<aura:attribute name="formFactor" type="String" default="{!$Browser.formFactor}"/>
<!-- Theme Layout Markup -->
<aura:attribute name="search" type="Aura.Component[]" required="false"/>
<aura:attribute name="profileMenu" type="Aura.Component[]" required="false"/>
<aura:attribute name="navBar" type="Aura.Component[]" required="false"/>
<aura:attribute name="newHeader" type="Aura.Component[]" required="false"/>

    <div class="customMenu">
        <c:DTE_CustomMenu />
    <div class="profileMenuRegion">
    <div class="mainContentArea">

After uploading your image, you can add a CSS rule to reference it with the appropriate scope using the Edit CSS under Branding:

enter image description here

For the Header Image:

background-image: url(/sfsites/c/file-asset/Image_Name?v=1)

For the Company Logo:

background-image: url(/sfsites/c/file-asset/Image_Name?v=1&height=300&width=300);

I find solution without apex.

To display logo on your component when you use napili community template you should add below code to your lightning component:

<div class="capricornThemeLayout siteforceNapiliBody" aura:id="baseThemeForm">
  <div class="capricornContainer">
    <div class="capricornNavBar">
      <div class="cBrandingLogo"></div>

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.