Foren
2 asset publiser in 1 page, portlet instance id is lost
juan meza, geändert vor 8 Jahren.
2 asset publiser in 1 page, portlet instance id is lost
Regular Member Beiträge: 228 Beitrittsdatum: 06.01.14 Neueste Beiträge
hi, i have liferay 6.2 GA4
i have a page, with 2 asset publishers in the same page...
both have custom template with velocity accesing the same web content custom structure...
when i was making the first template, i needed to use the portlet instance id in the velocity template, i got it like this:
this gets me the instance id, and it does it correctly...
but...
when i add the second asset publisher, with its custom velocity template (here i dont need instance id)... the instance id in the first asset publisher is lost!!!
if i add the second asset publisher to a different page, then they both work fine
why is this happening? and is there a way to solve this??
thank you!
i have a page, with 2 asset publishers in the same page...
both have custom template with velocity accesing the same web content custom structure...
when i was making the first template, i needed to use the portlet instance id in the velocity template, i got it like this:
$portletDisplay.instanceId
this gets me the instance id, and it does it correctly...
but...
when i add the second asset publisher, with its custom velocity template (here i dont need instance id)... the instance id in the first asset publisher is lost!!!
if i add the second asset publisher to a different page, then they both work fine
why is this happening? and is there a way to solve this??
thank you!
Dominique Ebert, geändert vor 8 Jahren.
RE: 2 asset publiser in 1 page, portlet instance id is lost
Junior Member Beiträge: 29 Beitrittsdatum: 01.02.13 Neueste Beiträge
Hi,
I stumbled upon a kind of similar problem a few weeks ago.
I had a thread where I asked why I can't get the PPID in a Freemarker / Velocity Template in the Dymamic Datalist Display Portlet.
I didn't get a answer yet and I'm hoping that the solution to your problem might help in my case aswell. So if you find any solution to your Problem I would highly appreciate if you'd share that solution.
Cheers
I stumbled upon a kind of similar problem a few weeks ago.
I had a thread where I asked why I can't get the PPID in a Freemarker / Velocity Template in the Dymamic Datalist Display Portlet.
I didn't get a answer yet and I'm hoping that the solution to your problem might help in my case aswell. So if you find any solution to your Problem I would highly appreciate if you'd share that solution.
Cheers
juan meza, geändert vor 8 Jahren.
RE: 2 asset publiser in 1 page, portlet instance id is lost
Regular Member Beiträge: 228 Beitrittsdatum: 06.01.14 Neueste Beiträge
Hi Dominique,
have you tried my method?
$portletDisplay is a variable available in the velocity template, then just get the instance ID,.. it works for me... when i have only 1 velocity template in the page... it may work in your case...
ill share in this post if i ever find the solution to this!
have you tried my method?
$portletDisplay.instanceId
$portletDisplay is a variable available in the velocity template, then just get the instance ID,.. it works for me... when i have only 1 velocity template in the page... it may work in your case...
ill share in this post if i ever find the solution to this!
Dominique Ebert, geändert vor 8 Jahren.
RE: 2 asset publiser in 1 page, portlet instance id is lost
Junior Member Beiträge: 29 Beitrittsdatum: 01.02.13 Neueste Beiträge
Hi Juan,
sadly doesn't work at all. I put one DDL-Display Portlet on a page and tried to retrieve the PIID in the way you suggested.
Sady I didn't get a result.
$portletDisplay.instanceId
sadly doesn't work at all. I put one DDL-Display Portlet on a page and tried to retrieve the PIID in the way you suggested.
Sady I didn't get a result.
juan meza, geändert vor 8 Jahren.
RE: 2 asset publiser in 1 page, portlet instance id is lost
Regular Member Beiträge: 228 Beitrittsdatum: 06.01.14 Neueste Beiträge
Hi Dominique
do you have
in your portal-ext.properties?
maybe its a restricted variable, I dont really know
do you have
velocity.engine.restricted.variables=
in your portal-ext.properties?
maybe its a restricted variable, I dont really know
oficina técnica, geändert vor 8 Jahren.
RE: 2 asset publiser in 1 page, portlet instance id is lost
New Member Beitrag: 1 Beitrittsdatum: 04.02.15 Neueste Beiträge
It's the same for me. I have 2 DDL portlets and when i add the second one, i lost instanceId.