Foren
(RESOLVED) redirect "return to full page" link
roger Smith, geändert vor 16 Jahren.
(RESOLVED) redirect "return to full page" link
New Member Beiträge: 9 Beitrittsdatum: 03.02.08 Neueste Beiträge
Hi everyone,
I would like to redirect the hyperlink "return to the full page" (located on the top right of portlets) on whatever page I want. But I can't find where I could change it.
Can someone help me ?
Thanks
I would like to redirect the hyperlink "return to the full page" (located on the top right of portlets) on whatever page I want. But I can't find where I could change it.
Can someone help me ?
Thanks
Tobias Amon, geändert vor 16 Jahren.
RE: redirect "return to full page" link
Liferay Master Beiträge: 546 Beitrittsdatum: 08.08.07 Neueste Beiträge
Hi,
do you want a statix url for all portlets?
You can create a new theme (Themes) and modify the file "portlet.vm" and specify a new "portlet-back-url".
do you want a statix url for all portlets?
You can create a new theme (Themes) and modify the file "portlet.vm" and specify a new "portlet-back-url".
roger Smith, geändert vor 16 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 9 Beitrittsdatum: 03.02.08 Neueste Beiträge
Hi tobias,
It works ! Thank you very much.
It works ! Thank you very much.
Alban Moreau, geändert vor 16 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 9 Beitrittsdatum: 03.02.08 Neueste Beiträge
Another problem appear,
When I click on "return to full page", I would like to see the same page as if I do "previous page" on my web browser, but it doesn't work.
How can I solve that ?
When I click on "return to full page", I would like to see the same page as if I do "previous page" on my web browser, but it doesn't work.
How can I solve that ?
Tobias Amon, geändert vor 16 Jahren.
RE: redirect "return to full page" link
Liferay Master Beiträge: 546 Beitrittsdatum: 08.08.07 Neueste Beiträge
Hi,
you could solve this by using javascript.
Add the code "window.history.go(-1)" or "window.history.back()" as javascript link or onclick function.
you could solve this by using javascript.
Add the code "window.history.go(-1)" or "window.history.back()" as javascript link or onclick function.
Alban Moreau, geändert vor 16 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 9 Beitrittsdatum: 03.02.08 Neueste Beiträge
Hi,
I didn't thought about the "javascript way", but it seems to be possible.
Unfortunately, I tried to implement this solution in the file "portlet.vm" like this ...
I also tried this way :
I was thinking about this variable in "portlet.vm" :
I was wondering if it is possible to set this variable to the value I want on a jsp page or elsewhere.
Thanks for responses
I didn't thought about the "javascript way", but it seems to be possible.
Unfortunately, I tried to implement this solution in the file "portlet.vm" like this ...
#if ( $portlet_display.isShowBackIcon() )
[b]<a href="javascript:window.history.go(back)" [ b] class="portlet-icon-back">#language("back")</a>
... and it doesn't work. Even if I can see "javascript:window.history.go(back)" appears on the bottom left (on firefox) when my mouse is on the link, nothing happens when I click on it.I also tried this way :
<a href="javascript://retour" [b]onclick[ b]="javascript:window.history.go(back);" class="portlet-icon-back">#language("back")</a>
and no more results.I was thinking about this variable in "portlet.vm" :
#set ( $portlet_back_url = $portlet_display.getURLBack() )
because it is the one that is not well allowed (the URL returned is not the previous page).I was wondering if it is possible to set this variable to the value I want on a jsp page or elsewhere.
Thanks for responses
Tobias Amon, geändert vor 16 Jahren.
RE: redirect "return to full page" link
Liferay Master Beiträge: 546 Beitrittsdatum: 08.08.07 Neueste Beiträge
Hi,
when adding the javascript function to onclick you don't need "javascript:". The method itself is sufficient.
Which browser do you use? If using firefox you can install web developer toolbar. There you can have a look at javascript errors and/or execute javascript methods in sort of a shell. There you could simply write "window.history.back()" or "window.history.go(-1)".
Also check your syntax. You wrote "window.history.go(back)" thats wrong. Try "window.history.go(-1)" or "window.history.back()".
when adding the javascript function to onclick you don't need "javascript:". The method itself is sufficient.
Which browser do you use? If using firefox you can install web developer toolbar. There you can have a look at javascript errors and/or execute javascript methods in sort of a shell. There you could simply write "window.history.back()" or "window.history.go(-1)".
Also check your syntax. You wrote "window.history.go(back)" thats wrong. Try "window.history.go(-1)" or "window.history.back()".
Alban Moreau, geändert vor 16 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 9 Beitrittsdatum: 03.02.08 Neueste Beiträge
My apologizes for the javascript syntax, it works now with this code :
Thank you for all
<a href="[b]javascript:window.history.back()[/b]" class="portlet-icon-back">#language("back")</a>
Thank you for all
Arati Didwania, geändert vor 14 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 18 Beitrittsdatum: 17.02.10 Neueste Beiträge
I want to set different values for the return to full page link on different portlet.
For example, the "return to full page link" on portlet1 redirects me to home page
and for portlet 2, I want the "return to full page link to redirect me to User profile page.
So how can I set values for the Return to full page link.
In portlet.vm file , I found this "portlet_back_url" variable which I believe sets the url dynamically. But the problem is where can I set this value???
Can anyone help me out?
Thanks for response in advance,
Arati
For example, the "return to full page link" on portlet1 redirects me to home page
and for portlet 2, I want the "return to full page link to redirect me to User profile page.
So how can I set values for the Return to full page link.
In portlet.vm file , I found this "portlet_back_url" variable which I believe sets the url dynamically. But the problem is where can I set this value???
Can anyone help me out?
Thanks for response in advance,
Arati
Corné A, geändert vor 14 Jahren.
RE: redirect "return to full page" link
Liferay Legend Beiträge: 1313 Beitrittsdatum: 03.10.06 Neueste Beiträge
just set it like this in portlet.vm
In your case you want to capture what portletID it is and then set this or that
look for $portletURLFactory and $portletDisplay and $portletConfig
#set ($portlet_back_url = $portlet_display.getURLBack())
In your case you want to capture what portletID it is and then set this or that
look for $portletURLFactory and $portletDisplay and $portletConfig
Arati Didwania, geändert vor 14 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 18 Beitrittsdatum: 17.02.10 Neueste Beiträge
Where can i set "setURLBack()" method of portlet_display so as to get the value right in portlet.vm file?
Corné A, geändert vor 14 Jahren.
RE: redirect "return to full page" link
Liferay Legend Beiträge: 1313 Beitrittsdatum: 03.10.06 Neueste Beiträge
Like I suggested in the portlet.vm you may override the variable
otherwise try using setURLBack(String urlBack)
BTW maybe yo need $portletDisplay.getURLMax()
otherwise try using setURLBack(String urlBack)
BTW maybe yo need $portletDisplay.getURLMax()
Arati Didwania, geändert vor 14 Jahren.
RE: redirect "return to full page" link
New Member Beiträge: 18 Beitrittsdatum: 17.02.10 Neueste Beiträge
1. How can we handle urlMax in Render_portlet.jsp so that we can set different values for different portlets?
2. Can we set value for "Return to full page " link in action class?
2. Can we set value for "Return to full page " link in action class?