Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tobia Zorzan
[solved] Current page link in web content template
April 18, 2011 5:36 AM
Answer

Tobia Zorzan

Rank: New Member

Posts: 3

Join Date: September 21, 2010

Recent Posts

Hi, I'm writing a custom template for a web content, i want a tab navigation.
Each element has a page link, but... how can I change the css for the current page? I want to add a "selected" css class if the link is to the current page. I'm trying tu use
1#set ($themeDisplay = $request.get('theme-display'))
2#set ($currentPlid = $getterUtil.getLong($themeDisplay.get('plid')))

but the plid doesn't change for every page :-(

Thank you
Tobia Zorzan
RE: Current page link in web content template
April 18, 2011 5:36 AM
Answer

Tobia Zorzan

Rank: New Member

Posts: 3

Join Date: September 21, 2010

Recent Posts

Sorry, my mistake.
Template was cacheable and doesn't work, as I use data from the request. Turning cache off, everything's ok.

Bye
Mohamed Rizwanuzaman
RE: Current page link in web content template
April 19, 2012 9:20 AM
Answer

Mohamed Rizwanuzaman

Rank: New Member

Posts: 18

Join Date: December 16, 2009

Recent Posts

HI Tobia,

Even am facing same, PLID is not changing according to page wise.
Could you help me in this issue. Am using LIferay-6.1
i set the following properties in portal-ext.properties but no luck.

layout.template.cache.enabled=false
last.modified.check=false
velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
theme.css.fast.load=false
theme.images.fast.load=false

Regards,
Rizwan
Amit Doshi
RE: Current page link in web content template
May 1, 2012 4:18 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 544

Join Date: December 29, 2010

Recent Posts

Hi Mohamed ,

Just uncheck "Cacheable" checkbox from your custom template by default it will be "checked".

I think it should work. It worked for me.

Thanks & Regards,
Amit Doshi
Mohamed Rizwanuzaman
RE: Current page link in web content template
May 30, 2012 5:27 AM
Answer

Mohamed Rizwanuzaman

Rank: New Member

Posts: 18

Join Date: December 16, 2009

Recent Posts

Hi Amit,
It Works.
Thanks,
Rizwan