Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Thomas Meyer
Navigate to iframe "deep link" from another portal source
4 giugno 2013 1.59
Risposta

Thomas Meyer

Punteggio: New Member

Messaggi: 6

Data di Iscrizione: 4 giugno 2013

Messaggi recenti

Hello,

while working with Liferay I got the following problem:
I integrated an instance of Atlassian JIRA as iframe into the portal. The authentication mechanism works fine, so there's everything okay.
But now I want to navigate from another portlet on another site of the portal to a deeper link in JIRA on the iframe site.
Is it possible to tell the iframe to not only show the embedded application but to navigate deeper into it, when clicked on a link? How would this link look like?
In my case I want to navigate to a specific issue / ticket in Atlassian JIRA, shown in the iframe.

Thanks & best regards
Thomas
Kan Zhang
RE: Navigate to iframe "deep link" from another portal source
4 giugno 2013 15.18
Risposta

Kan Zhang

Punteggio: Junior Member

Messaggi: 68

Data di Iscrizione: 1 dicembre 2010

Messaggi recenti

The link would like this (just an example, your iframe portelt id would be different):

http://localhost:8080/web/guest/home?p_p_id=48_INSTANCE_ny8OCuP1MJgU&_48_INSTANCE_ny8OCuP1MJgU_src=http://www.cnn.com
The pattern is:
${your.site.page.url}?p_p_id=${iframe.portlet.instance.id}&${iframe.portlet.instance.portlet.namespace}src=${deep.link}
where
your.site.page.url=http://localhost:8080/web/guest/home
iframe.portlet.instance.id=48_INSTANCE_ny8OCuP1MJgU
iframe.portlet.instance.portlet.namespace=_48_INSTANCE_ny8OCuP1MJgU_
deep.link=http://www.cnn.com

you can use <liferay-portlet:renderURL> tag to generate the url, for example:

<liferay-portlet:renderURL plid="13605" portletName="48_INSTANCE_ny8OCuP1MJgU" var="iframeUrl">
<liferay-portlet:param name="src" value="http://www.cnn.com" />
</liferay-portlet:renderURL>

the plid is you page id that contains the iframe portlet.
Thomas Meyer
RE: Navigate to iframe "deep link" from another portal source
5 giugno 2013 0.57
Risposta

Thomas Meyer

Punteggio: New Member

Messaggi: 6

Data di Iscrizione: 4 giugno 2013

Messaggi recenti

Okay, I tried this but unfortunately it did not work.
When navigating to the iframe site in Liferay the link looks like this:
http://myurl:8000/group/mycockpit/jira#http://myurl:8000/c/iframe/proxy?p_l_id=13436&p_p_id=48_INSTANCE_6xZ0&

Well, p_p_id seems to be: "48_INSTANCE_6xZ0"
The portlet namespace would be "_48_INSTANCE_6xZ0_", right?
So I followed your advice and built my url like this:

http://myurl:8000/group/mycockpit/jira?p_p_id=48_INSTANCE_6xZ0&_48_INSTANCE_6xZ0_src=http://myurl:9000/browse/ISSUE-3

But when browsing to this url Liferay shows the dashboard of my Jira instance again instead of the deep link.
Any further suggestions?
Kan Zhang
RE: Navigate to iframe "deep link" from another portal source
6 giugno 2013 10.44
Risposta

Kan Zhang

Punteggio: Junior Member

Messaggi: 68

Data di Iscrizione: 1 dicembre 2010

Messaggi recenti

The method does not work with form authentication. It only works with HTTP BASIC Auth or without Auth.
Thomas Meyer
RE: Navigate to iframe "deep link" from another portal source
12 giugno 2013 7.33
Risposta

Thomas Meyer

Punteggio: New Member

Messaggi: 6

Data di Iscrizione: 4 giugno 2013

Messaggi recenti

Ah, thanks a lot.
But does that mean there isn't any possibility to use deep links with form authentication?

Regards,
Thomas