Include static sitemap in Liferay
Asked Answered
O

2

8

I'm in need of putting a static sitemap.xml file, because Liferay does not generate all of the desired links, and a few that shouldn't be there. I think it's because it's heavily altered by my ext-plugin.

Question is, that is it possible to set up a static sitemap.xml(used by google robots) in the portal root, not being changed by Liferay itself?

Using: Liferay 6.0.6

Thanks in advance :)

Orsay answered 29/10, 2012 at 15:15 Comment(0)
O
2

The best solution was to create a SitemapServlet class in Liferay (as suggested by Johnny) which responses with the sitemap file. No changes in Tomcat were needed.

Orsay answered 6/12, 2012 at 15:6 Comment(0)
B
6

A solution would be to add your static sitemap to the Liferay Document Library, and then tell Google the sitemap URL using Google's Webmaster Tools.

A second solution would be to add the sitemap to your ROOT directory (if you're using Tomcat), however this may require some changes to Tomcat settings and Liferay code.

Another solution is to create a portlet that generates all the links you want into an XML sitemap, and then save that file to a location of your choose. This is the approach I have taken as I needed to out put full article URLs which don't actually exist as pages.

Boatsman answered 30/10, 2012 at 9:0 Comment(0)
O
2

The best solution was to create a SitemapServlet class in Liferay (as suggested by Johnny) which responses with the sitemap file. No changes in Tomcat were needed.

Orsay answered 6/12, 2012 at 15:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.