Home Ask Login Register

Developers Planet

Your answer is one click away!

Manticore February 2016

Liferay Sitemap: Filter List of Layouts by SEO Settings

As you probably know, there is a Sitemap-Portlet in Liferay that you can bring into form using a Freemarker-Template in Portlet-Configuration.

Now in a normal Liferay Page under "SEO Settings" you can decide whether to include that page into the sitemap or not.

If you don't include it, it gets removed from the actual Sitemap (/sitemap.xml) but still is shown in the portlet.

Is there a way to access these "SEO Settings" (from freemarker code) so I could somehow filter by setting?

Thanks in advance!


Manticore February 2016

Nevermind, I found out when looking into liferay database table 'layout'. There is a column for TypeSettings which sometimes contained 'sitemap-include=1', so I simply checked it using layout.getTypeSettingsProperty("sitemap-include").

Post Status

Asked in February 2016
Viewed 2,186 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life