Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: Widget template cannot be emeded inside the same template type.
If navigation widget template is embeded to another navidation template <@liferay.navigation_menu default_preferences="${preferences}" instance_id="instance1"/> the error message is displayed “The application cannot include itself.”
The issue came up with Liferay DXP 7.4.
Could this be optional, configuration, or property?
All I can think of is the old Xzibit meme "Yo dawg, we hear you like navigation, so we put a navigation menu into your navigation, so that you can navigate while you navigate".
But seriously: Can you describe the underlying use case more? It might have a more elegant solution than (what feels like) recursion.
Hi Olaf, if we exclude any pragmatic thought, this is a serious
  breaking change, without any resolution. We made our navigation very
  flexible and automatic for editors with 2 layers. Liferay can make
  configurable this nesting option to prevent some malusage. One if
  condition made us the problem to reimplement everithing from the
  scratch, and our customer is very angry about that.
 Reproduction
  steps:
 1.  Go to Design -> Templates -> Widget Templates and
  click plus to create a new one of type “Menu Display Template”
 2.
  Set the title "New Menu Template"
 3. Add the code bellow
  inside the FTL editor
 <#assign preferences =
  freeMarkerPortletPreferences.getPreferences({"portletSetupPortletDecoratorId":
  "barebone"}) />
 <@liferay.navigation_menu
  default_preferences="${preferences}"
  instance_id="instance1"/>
 4.Go to Fragments >
  Click on plus to create new Fragment Set > Set title “New Fragment
  Set”
 5.In the fragment set create a new fragment with name “New
  Fragment”
 6. In the HTML editor input code
  <lfr-widget-nav></lfr-widget-nav>
 7.Go to Home page
  and Edit it
 8. Find newly created fragment “New Fragment” and add
  to page
 9. Click on the configuration (three dots) and select
  "New Menu Template" to be displayed
Expected results:
Menu inside menu should appear
Current results:
The message “The application cannot include itself.”