<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Navitem class issue in liferay 6.1 vs Liferay 7</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114693180" />
  <subtitle>Navitem class issue in liferay 6.1 vs Liferay 7</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114693180</id>
  <updated>2026-04-03T21:03:18Z</updated>
  <dc:date>2026-04-03T21:03:18Z</dc:date>
  <entry>
    <title>Navitem class issue in liferay 6.1 vs Liferay 7</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114693179" />
    <author>
      <name>Shiva Lingam K</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114693179</id>
    <updated>2019-08-09T06:14:50Z</updated>
    <published>2019-08-09T06:14:50Z</published>
    <summary type="html">Hi all,In Liferay 6.1 I am using the below code for navigation purpose based on ancestors from Layout the navigation works &lt;br /&gt;&lt;strong&gt;Layout currentLayout = ancestors.get(levelMax);&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;NavItem navItem = NavItem.fromLayout(vars, currentLayout);&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;But in Liferay 7 the above method has been changed as shown below&lt;em&gt;&lt;strong&gt;List&amp;lt;NavItem&amp;gt; navItem= NavItem.fromLayouts(httpServletRequest, themeDisplay, (Map&amp;lt;String,Object&amp;gt;)contextObjects);&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/em&gt;The above method is list type so I am unable to send the corresponding Navitem and the &lt;strong&gt;&lt;em&gt;currentLayout &lt;/em&gt;&lt;/strong&gt;object in that method. I want to use currentLayout in &lt;em&gt;&lt;strong&gt;fromLayouts() &lt;/strong&gt;&lt;/em&gt;method&lt;em&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/em&gt; So can anyone send me the solution for this?</summary>
    <dc:creator>Shiva Lingam K</dc:creator>
    <dc:date>2019-08-09T06:14:50Z</dc:date>
  </entry>
</feed>
