2

I have added a LWC component onto an APP page:

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

I have then set the App Page as a tab for my App.

When my flexipage is rendered, there is a default header with my tab icon and tab name rendered in the UI.

How can i hide that header so that the only thing rendered is my flexipage LWC component?

Upd Looking for a way that doesn't involve breaking out of SF sandbox to use full DOM CSS to hide the header because that is error prone and will break each time SF will roll out a new update that changes those classes.

  • Possible duplicate of Hide standard app page header – Raul Jun 13 '19 at 9:25
  • @Raul i would've hoped there is some less error-prone solution. The answer to the question you linked involves hacking away at sandboxed css and will break each time SF roll out a new update that changes those class names. – zaitsman Jun 13 '19 at 9:27
  • If you have a single component, you can possibly wrap the LWC component to an aura component then Add Lightning Components as Custom Tabs in a Lightning Experience App. Downside would be you would lose the app builder functionality. CSS hack looks the only possible solution as of now. – Raul Jun 13 '19 at 9:30
  • @Raul that sort of worked in the sense that my header is gone. But now, i can't find where to pass any parameters to my component on this tab? What i am trying to achieve is have list-like components for different types of records. (e.g. many tabs for the same object). With LWC and AppBuilder i can create many tabs and simply pass the record type to my component, and i'm set. It seems with Aura there is no way to pass parameters from tab to the Aura Host... – zaitsman Jun 13 '19 at 9:43
  • With the component as a tab, we would lose all the configurable functionality available on App Builder. We had similar list component, and the way we overcame this issue was to conditionally remove our custom header from component, was done using a lightning:flexipageRegionInfo. – Raul Jun 13 '19 at 9:57

Your Answer

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

Browse other questions tagged or ask your own question.