• Cory Iler
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I am looking at creating a custom home page template in Lighting but I can't seem to get a header added into this. I currently have the three regions displaying fine but for some reason am a bit lost on how to add a header that spans all three regions accross the top.

Here is my component markup:
<aura:component implements="lightning:homeTemplate" 
                description="A home page you always dreamed of, 3 columns." >
    <aura:attribute name="region_header" type="Aura.Component[]" />
    <aura:attribute name="column1" type="Aura.Component[]" />
    <aura:attribute name="column2" type="Aura.Component[]" />
    <aura:attribute name="column3" type="Aura.Component[]" />
    
    <div>
        <lightning:layout horizontalAlign="spread" pullToBoundary="small">
            <lightning:layoutItem size="4" flexibility="grow" 
                                  padding="around-small">
                {!v.column1}
            </lightning:layoutItem>
            <lightning:layoutItem size="4" flexibility="grow" 
                                  padding="around-small">         
                {!v.column2}
            </lightning:layoutItem>
            <lightning:layoutItem size="4" flexibility="grow" 
                                  padding="around-small">
                {!v.column3}
            </lightning:layoutItem>
        </lightning:layout>
    </div> 
</aura:component>

And here is the design markup:
<design:component label="3 Column Page">
    <flexipage:template >
        <flexipage:region name="region_header"    defaultWidth="Medium" />
      <flexipage:region name="column1" defaultWidth="Medium" />
      <flexipage:region name="column2" defaultWidth="Medium" />
      <flexipage:region name="column3" defaultWidth="Medium" />
  </flexipage:template>
</design:component>
So I have a field called "Days Since Last Order." Pretty basic formula field:

TODAY() - LastOrderDate__C. This works perfect and gives me the days.

But what is happening is if the customer has never ordered it shows 0 as if they just ordered today. I need this field, if the LastOrderDate__c is null to display "NEVER" but if there is a value to display the number.