This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. « Back to Search Engine...
Developing portlets with improved SEO capabilities
Here you have some recommendations for developing portlets with improved SEO Capabilities:
**1. Use friendlyurlmapper** #
Use friendlyurlmapper in your portlet so it transforms long and ugly urls into something more friendly and prettier:
http://www.liferay.com/es/community/wiki/-/wiki/Main/friendlyurlmapper
2. Use Liferay API to add keywords, title and description to the page
Use Liferay API methods to add (or overwrite) keywords, title and description to the page:
- PortalUtil.addPageTitle (String myTitle, HttpServletRequest request) - Adds myTitle to the current title of the page where your portlet is placed.
- PortalUtil.setPageTitle (String myTitle, HttpServletRequest request) - Overwrites the title of the page where the portlet is placed with myTitle.
- PortalUtil.addPageKeywords (String myKeywords, HttpServletRequest request) - Adds my keywords (String which contains your keywords separated by commas) to the keywords of the current page.
- PortalUtil.setPageKeywords (String myKeywords, HttpServletRequest request) - Overwrites the keywords of the page where your portlet is placed.
- PortalUtil.addPageDescription (String myDescription, HttpServletRequest request) - Adds myTitle to the current title of the page where your portlet is placed.
- PortalUtil.setPageDescription (String myDescription, HttpServletRequest request) - Overwrites the description of the plage where your portlet is placed.
3. Use semantic HTML
Reinforce the semantics, or meaning of the information using HTML markup:
- Proper use of HTML tags: P, LI, TABLE, etc
- Add classes to make the HTML themable
- Use of RDFa, microformats or microdata
21559 Views