Skip to content

Instantly share code, notes, and snippets.

@randombrad
Last active December 16, 2015 19:18
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 randombrad/5483732 to your computer and use it in GitHub Desktop.
Save randombrad/5483732 to your computer and use it in GitHub Desktop.
#foreach ($nav_child in $current_nav_items)
#if ($nav_child.isSelected())
<li class="selected">
#else
<li>
#end
<a href="$nav_child.getFriendlyURL()" $nav_child.getTarget()>$nav_child.getName($locale)</a>
</li>
#end
#set ($layoutLocalService = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))
#set ($groupLocalService = $serviceLocator.findService("com.liferay.portal.service.GroupLocalService"))
#set ($current_group = $groupLocalService.getGroup($company_id,"Custom Site Name"))
#set ($current_nav_items = $layoutLocalService.getLayouts($current_group.getGroupId(), false, 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment