Skip to content
Franco Mussopower pages
Code snippet

Liquid code to conditionally output Logo field from Account table

Copy it with the button on the code. For the why and the walkthrough, see “Custom Per-Partner Branding in Power Pages – Part 2: Liquid and CSS”.

Liquid code to conditionally output Logo field from Account tableLiquid
{%- if user.parentcustomerid -%}
    {%- assign account = entities['account'][user.parentcustomerid.id] -%}
    {%- if account.musdyn_portalbrandinglogoid -%}
        <a href="~/" tile="home"><img class="desktop-logo" style="width: auto; height: 55px; margin-top: -1em;"
        src="~/Image/download.aspx?entity=account&attribute=musdyn_portalbrandinglogo&id={{ user.parentcustomerid.id }}&Full=true" 
        alt="{{ account.name }} logo"></a>
    {%- endif -%}
    {%- else -%}
        <a href="~/" tile="home"><img style="width: 120px; margin-top: -5px;" class="desktop-logo" src="~/songify-logo-coloured.svg" alt="Songify logo"></a>
{% endif %}

Search

Book a discovery call

30 minutes. Bring your trickiest Power Pages problem — I’ll tell you honestly whether I’m the right fit.