Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dinesh Balaji
Want to Get Parent Page Name in VM File
July 28, 2011 10:10 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

<p>Hi All,</p>
<p>I have a Parent Page which inturn has 3 child Pages. When ever I click on Parent Page the child Page get loaded up(this one I achieved through coding in VM ). Now I want to get the Parent Page Frienly URL in VM file, since each time the child page URL is shown Up.</p>
<p>Thanks For the reply in Advance !!<span style="white-space: pre;"> </span></p>
<p><span style="white-space: pre;">W</span>arm Regards,</p>
<p>Dinesh V</p>
Dave Weitzel
RE: Want to Get Parent Page Name in VM File
July 29, 2011 4:35 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 203

Join Date: November 18, 2009

Recent Posts

I think you should post your actual VM code as this shouldn't be necessary if you are doing anything like the default navigation.vm I strongly suggest you look at that code in order to create you own navigation.

However within a theme you have access to the layout() model and so can make calls to
getParentLayoutId() and from there you may then be able to getFriendlyURL()

check out the javadocs at http://docs.liferay.com/portal/6.0/javadocs/index.html?index-all.html for more ideas

Dave
Dinesh Balaji
RE: Want to Get Parent Page Name in VM File
August 7, 2011 10:01 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

<p>Thanks Dave,</p>
<p>I have achieved using this method -&nbsp;$propsUtil.get($ancLayoutLink)</p>