Skip to content

Instantly share code, notes, and snippets.

@duracell80
Created August 5, 2021 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duracell80/28ca37134df6f942e0cee64b737b4ce4 to your computer and use it in GitHub Desktop.
Save duracell80/28ca37134df6f942e0cee64b737b4ce4 to your computer and use it in GitHub Desktop.
Liferay - ADT Navigation Widget Template Data Discovery
<!--${themeDisplay.getLayout().getLayoutSet().getGroup()}-->
${themeDisplay.getCompanyLogo()}
<#assign page_name = themeDisplay.getLayout().name
site_home = themeDisplay.getLayout().getLayoutSet().getGroup().friendlyURL
site_id = themeDisplay.getLayout().getLayoutSet().groupId
site_name = themeDisplay.getLayout().getLayoutSet().getGroup().name
site_logo_id = themeDisplay.getLayout().getLayoutSet().logoId
site_logo = themeDisplay.getCompanyLogo()
site_logo_description = "Go to the " + site_name + " homepage"
page_logo_description = "Go to the " + page_name + " homepage"
full_templates_path = themeDisplay.getPathThemeTemplates()
/>
${site_logo_description}
<hr>
<#if entries?has_content>
<#list entries as navigationEntry>
<#list navigationEntry.getChildren() as childEntry>
<ul>
<li>Child Name: ${childEntry.getName()}</li>
<li>Child URL: ${childEntry.getURL()}</li>
</ul>
<ul>
<#list childEntry?keys as c>
<li>${c}</li>
</#list>
</ul>
<h2>Expando</h2>
<#assign childTarget = "_self" />
<#list childEntry.expandoAttributes?values as v>
<#list v as field>
<#if field?contains("_") >
<#assign childTarget = field />
</#if>
</#list>
</#list>
${childTarget}
</#list>
</#list>
</#if>
<hr>
<button class="btn btn-unstyled" aria-label="times" type="sumbit"><@clay["icon"] symbol="search" /></button>
<@liferay.user_personal_bar />
<#assign myHash = themeDisplay />
<ol>
<#list myHash?keys as k>
<li>${k}</li>
</#list>
</ol>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment