Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alan Wamser
URL in template
July 19, 2011 9:39 AM
Answer

Alan Wamser

Rank: Junior Member

Posts: 26

Join Date: April 15, 2010

Recent Posts

I've created a template with an Option - Link to Page. How do i create the URL to this page in the Template (VM)?

Thanks,
Alan
Felix J Christy
RE: URL in template
July 19, 2011 9:44 PM
Answer

Felix J Christy

Rank: Regular Member

Posts: 111

Join Date: August 25, 2009

Recent Posts

Hi,

I guess, you have created a structure with option Link to Page. Lets say your structure variable name is myLink then, in template, to get the data, you have to use getFriendlyUrl().


When you create a web content, you have to select the structure-template that you have created. Web content creation page will allow you to choose the page for link, and that will automatically construct the URL for you.

Thanks,
Felix