irene
irene

Reputation: 37

How to get plid of a portlet in .vm?

I need to retreive the plid of a portlet in my theme(.vm).

Can't find an appropriate way to do this.

I need to open My Account portlet as a popup. The code for this is to be written in the theme.

I am using

#set ($my_url = $portletURLFactory.create($request, "2", $getterUtil.getLong($plid), "RENDER_PHASE"))

and then using the url in anchor tag:

<a style="color: #ffffff" href="$my_URL">Click Here</a>

But on click i am redirected to blank page.

Why is that so?

Upvotes: 0

Views: 1309

Answers (1)

lucky
lucky

Reputation: 147

Below is the code to get plid(pageId in vm)

#set ($themeDisplay = $request.get('theme-display'))

#set ($currentPlid = $getterUtil.getLong($themeDisplay.get('plid')))

Upvotes: 1

Related Questions