Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Oskar B.
Mapping URL's to pages in Liferay
March 1, 2012 12:07 AM
Answer

Oskar B.

Rank: New Member

Posts: 2

Join Date: February 29, 2012

Recent Posts

Hello everyone,

I am new to the Liferay platform and have a question concerning dynamically displaying of content from several external data sources.

What i want to achieve is map URL's that match certain patterns to a single mechanism (page, template, portlet or something like that) and let the content be displayed from external sources using the URL. For example these URL's:

- http://myportal.com/main-category/
- http://myportal.com/main-categroy/123/abc/

Should both me mapped to some generic mechanism that displays content from external sources. So far i have been unable to find a way to achieve this, but since i am new to the platform it's very possible i have overlooked some opportunities. I have found several pieces of documentation mentioning integrating different data sources through webservices. So the main challenge is that i neede about 75% of all URL's for the portal to be mapped to a single page/portlet for further processing and content diaplaying. How would i got about this?

Thanks in advance for the help.
Anil Sunkari
RE: Mapping URL's to pages in Liferay
March 1, 2012 9:20 PM
Answer

Anil Sunkari

Rank: Expert

Posts: 427

Join Date: August 11, 2009

Recent Posts

Hi Oskar,

If i'm correct with your concern.Here i give you sugegstion.While creating page you can select type of page defaultly it will be portlet.If you select url from the list & then provide your external url in the below showing url text box & save the page settings.Later while you access the page it will redirect you to the given external url.Let me know for more clarification needed.Thanks
Oskar B.
RE: Mapping URL's to pages in Liferay
March 6, 2012 2:05 PM
Answer

Oskar B.

Rank: New Member

Posts: 2

Join Date: February 29, 2012

Recent Posts

Thank you for the assistance Anil, i found that feature but it is not quite what i need. I have content in XHTML form stored in several systems that i want to present this content inside a Liferay portal. I want to be able to route URL's that match certain patterns to a single template that renders this content inside liferay. For example:
  • http://somedomain.com/some-section/some-subsection/some-article/

should be routed to:
  • http://somedomain.com/external-content.jsp?url=/some-section/some-subsection/some-article/


When the example URL is requested the external-content.jsp would pull the content from the external system using webservices or whatever and display the content. The main problem is that i do not know if this is possible in Liferay and how i would be able to implement the routing of URL's to some custom code.

Update: Unfortunately no responses yet, a short description of how to implement custom request routing to help me on my way would be greatly appreciated.