Fórum
Liferay 6: Can the Liferay Friendly URL can be modified in my case
Ravi Kiran, modificado 12 Anos atrás.
Liferay 6: Can the Liferay Friendly URL can be modified in my case
Junior Member Postagens: 53 Data de Entrada: 08/04/12 Postagens Recentes
Hi ,
I am using liferay 6.1
I have added this inside the liferay-portet.xml file
<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>Gasd</friendly-url-mapping>
<friendly-url-routes>com/test/friendlier-friendly-url-routes.xml</friendly-url-routes>
And as per the COntext root (Or the Portlet name ) this is my friendlier-friendly-url-routes.xml
<routes>
<route>
<pattern>/satportlet</pattern>
</route>
</routes>
But still the URL of that Portlet looks this way when i did a Submit Operation
http://localhost:8086/web/guest/home/-/Gasd/satportlet?p_auth=EFAy7VSA&p_p_lifecycle=1&_satportlet_WAR_SatPractportlet_javax.portlet.action=addBook
Is there anyway that this can be improved .
I am very much new to Liferay , please suggest me , i am ready to do chnages as you mention .
I am using liferay 6.1
I have added this inside the liferay-portet.xml file
<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>Gasd</friendly-url-mapping>
<friendly-url-routes>com/test/friendlier-friendly-url-routes.xml</friendly-url-routes>
And as per the COntext root (Or the Portlet name ) this is my friendlier-friendly-url-routes.xml
<routes>
<route>
<pattern>/satportlet</pattern>
</route>
</routes>
But still the URL of that Portlet looks this way when i did a Submit Operation
http://localhost:8086/web/guest/home/-/Gasd/satportlet?p_auth=EFAy7VSA&p_p_lifecycle=1&_satportlet_WAR_SatPractportlet_javax.portlet.action=addBook
Is there anyway that this can be improved .
I am very much new to Liferay , please suggest me , i am ready to do chnages as you mention .
Paul ., modificado 12 Anos atrás.
RE: Liferay 6: Can the Liferay Friendly URL can be modified in my case
Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
You specified the patter as
this means that liferay will map the the parameters which you specify along with this patter, which seems to be missing here.
So liferay will replace / add parameter values when it finds a url starting with
for example you can specify the <implicit-parameter name="p_p_lifecycle">2</implicit-parameter>
so this won't appear in the url and they will appear more friendly
Go through this link: http://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper
It will be very helpful, and post you question in case you can't figure out something
Hope it helps
<pattern>/satportlet</pattern>
this means that liferay will map the the parameters which you specify along with this patter, which seems to be missing here.
So liferay will replace / add parameter values when it finds a url starting with
http://localhost:8086/web/guest/home/-/Gasd/satportlet
for example you can specify the <implicit-parameter name="p_p_lifecycle">2</implicit-parameter>
so this won't appear in the url and they will appear more friendly
Go through this link: http://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper
It will be very helpful, and post you question in case you can't figure out something
Hope it helps