« Zurück zu 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
0 Anhänge
21481 Angesehen
Durchschnitt (3 Stimmen)
Die durchschnittliche Bewertung ist 4.66666666666667 von max. 5 Sternen.
Kommentare