Is it possible to use conditional tags in my communities header and footer section? I believe sections allow HTML/CSS but I need to be able to show different HTML links depending on the User Profile.

If this cannot be done, what would be the alternative solution?


Looks like you could leverage page variations alongside custom theme layouts, which are out of the box functionality in lightning communities.

Custom theme layouts are a bit more complex, but will help you achieve the personalization you need in your community for your different target audiences

This allows your users to be targeted by profile, therefore if profile A logs in, you can customize the community to display x links and Profile B another set of links.

In this post you can find further details on setting page variations, basically, select the page settings at the topf of your page while in builder mode, create a new page variation and then you can select a target audience: enter image description here

  • The problem with Page variations is that it they still use the same header and footers as they are marked as "Shared" in the builder page. This is the section I need to make dynamic. – Deployment Failure Nov 17 '17 at 11:28
  • 1
    Hence the custom theme layout addition – glls Nov 17 '17 at 11:58

Create a custom template using lightning. Here you can handle the header and footer logically whatever way you want.


I was able to achieve this by creating a Visualforce page and dropping it into the builder in the top and bottom of my pages.

In my Visualforce page I placed apex:outputpanels which rendered depending on the profile like this:

<apex:outputPanel id="thepanel" layout="none" rendered="{!$Profile.Name == 'Customer Community Login User'}">

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.