1

We are trying to remove sidebar from default home page layout.

I have even tried to create App Page, copy App Page single column layout and substitute the code of Home Page by it and then deploy it

<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <flexiPageRegions>
        <componentInstances>
            <componentName>Component</componentName>
        </componentInstances>
        <name>main</name>
        <type>Region</type>
    </flexiPageRegions>
    <masterLabel>Home Page Default</masterLabel>
    <template>
        <name>flexipage:defaultAppHomeTemplate</name>
    </template>
    <type>HomePage</type>
</FlexiPage>

but when I tried to deploy it this failed with error

*********** DEPLOYMENT FAILED *********** All Component Failures: 1. flexipages/Home_Page_Default.flexipage -- Error: You can't use template flexipage:defaultAppHomeTemplate with page type HomePage.

*********** DEPLOYMENT FAILED ***********

Is that possible at all to use one-column layout for lightning home page layout?

If this is possible then how do I implement this?

1 Answer 1

2

Looks like there is an option but available only in Winter'18 release.

You need to create the following component HomePageSingleColumnTemplate with the following code

<aura:component implements="lightning:homeTemplate">
    <aura:attribute name="main" type="Aura.Component[]" /> 

    <div>
        <lightning:layout horizontalAlign="spread">
            {!v.main}
        </lightning:layout>
    </div>
</aura:component>

Also you have to specify design for it

<design:component >
    <flexipage:template >
        <flexipage:region name="main" defaultWidth="Xlarge">
        </flexipage:region>
    </flexipage:template>
</design:component>

You might or might not specify an icon for it, you can read interface description here and advanced configuration guide here about how to specify an icon or image for your template.

Then you just need to create a new Lightning Home page based on created layout and you will see one column.

So now the flexiPage would look like following

<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <flexiPageRegions>
        <componentInstances>
            <componentName>Component</componentName>
        </componentInstances>
        <name>main</name>
        <type>Region</type>
    </flexiPageRegions>
    <masterLabel>Home Page Default</masterLabel>
    <template>
        <name>HomePageSingleColumnTemplate</name>
    </template>
    <type>HomePage</type>
</FlexiPage>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .