-
1. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
soshah Jul 26, 2007 4:02 PM (in response to explorer)The 'Space' character being encoded as '+' is part of standard URL encoding rules set forth by the RFC 1738. see here for details: http://tools.ietf.org/html/rfc1738
If you need your URL to have an '_' instead of '+', make sure the value being encoded is About_Us and not About Us
btw- I am just curious why the '+' sign in the URL matters when the title itself shows the 'Space' character as you would expect. The '+' does get decoded back into 'Space' character when your server receives the request
Hope this helps.
Thanks -
2. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
theute Jul 26, 2007 4:12 PM (in response to explorer)Just to add to Sohil answer. You can name your page About_Us and localize it as "About Us" (see the doc)
-
3. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
explorer Jul 26, 2007 7:09 PM (in response to explorer)Guys Thanks for the replies,
But, my problem here is.
1) the URLs should be user friendly. Precisely, users should be able to type in the URLs in the browser and go to a page.
www.MySite.com/About_Us
where if we find that its www.MySite.com/About+Us .. then thats not UserFriendly.
2) Using Localization according to doc.
If i had inferred correct, This would not hold good for pages being defined from Portal Admin interface.
Apart from this there is one more issue....
How can i set the title of a portal page/Portlet as html title. -
4. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
theute Jul 27, 2007 3:26 AM (in response to explorer)2) yes that's not possible from the admin interface.
Then you need to write your own command mapper. The portal has to know on which page to go base on the URL. -
5. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
bvogt Jul 27, 2007 8:17 AM (in response to explorer)what is nesessary to integrate an own command mapper?
Do I have to re-compile the portal sources for this?
Thanks. -
6. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
explorer Jul 27, 2007 10:48 AM (in response to explorer)Thanks guys... Well coming to command mapper is it a patter that we need to implement or is it hidden some where in the sources of the portal...
Also please advice me of how i can get to set the html title name either from a portlet or a portal page. -
7. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
bvogt Aug 24, 2007 10:28 AM (in response to explorer)we have a solution based on portal 2.4 / AS 4.0.5...
...luckily live, since yesterday evening...
In portal 2.4.1 (and hopefully in 2.6 too) you have to differentiate between page localization and page identification.
The name you edit in the management portlet is used for building the portal URLs.
With this kept in mind we did:
1. decided, that page names are treated as keys to be looked up in property files - all localization is done within this set of locaization files
2. provided a custom navigation portlet which retrieves the page name and localizes it
3. due to the lack of knowledge how to define a page interceptor for page related tasks... we set the localized page name into the portlet session with APPLICATION_SCOPE
4. in the theme's index.jsp we retrieve the localized page name out of the session and set it within the title tag.
Yes, you're right, 3. and 4. are somewhat like a hack, but it works... -
8. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
explorer Aug 26, 2007 2:52 AM (in response to explorer)Thanks for the reply.
Well can you please advice me of how you were accessing the portlet session in the theme's index.jsp. A code snippet would greatly help. -
9. Re: UserFriendly URLs: Can we have an '_' instead of '+' in
bvogt Aug 26, 2007 6:06 AM (in response to explorer)Since your in a jsp, you cannot access the portlet session - in the meaning of the portlets individual session.
We do it the other way around:
The object is written to the session with visibility PortletSession.APPLICATION_SCOPE, which means that not only other porlets can access that attribute, servlets and JSPs can do that too.
In a jsp you do that by using the implicitly available object: 'session'
like:<TITLE><%= session.getAttribute("localzedPageTitle"); %></TITLE>
May be the following link is helpful:
http://java.sun.com/products/jsp/syntax/2.0/card20.pdf