Home > My Works, Tech, software > Liferay Dynamic Site Map Portlet

Liferay Dynamic Site Map Portlet

Add to FacebookAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to TwitterAdd to TechnoratiAdd to FurlAdd to Newsvine

Here is my second liferay portlet. I modified the usual site map portlet to work like a  dynamic site explorer (see the screen shot).

you can download the required files here.

Download Dynamic Site Map Portlet[site_map.zip ]

to modify your current site map portlet, extract these files and overwrite over webapps\ROOT\html\portlet\site_map directory.

SITE MAP

If you want to create a new portlet, follow these steps.

1. rename the extracted folder to sitemap_1

2. create a folder under webapps\ROOT\html\portlet\ named ext

3. copy sitemap_1 folder to ext folder

4. copy the following code to webapps\ROOT\WEB-INF\portlet-ext.xml

<portlet>
<portlet-name>sitemap_1</portlet-name>
 <display-name>Site Map 1</display-name>
<portlet-class>com.liferay.util.bridges.jsp.JSPPortlet</portlet-class>
 <init-param>
 <name>view-jsp</name>
 <value>/html/portlet/ext/sitemap_1/view.jsp</value>
 </init-param>
 <expiration-cache>0</expiration-cache>
 <supports>
 <mime-type>text/html</mime-type>
 </supports>
 <resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
 <security-role-ref>
 <role-name>guest</role-name>
 </security-role-ref>
 <security-role-ref>
 <role-name>power-user</role-name>
 </security-role-ref>
 <security-role-ref>
 <role-name>user</role-name>
 </security-role-ref>
 </portlet>

5. copy the following code to webapps\ROOT\WEB-INF\liferay-portlet-ext.xml

<portlet>
<portlet-name>sitemap_1</portlet-name>
 <configuration-action-class>com.liferay.portlet.sitemap.action.ConfigurationActionImpl</configuration-action-class>
<portlet-data-handler-class>com.liferay.portlet.sitemap.lar.SitemapPortletDataHandlerImpl</portlet-data-handler-class>
 <use-default-template>true</use-default-template>
 <restore-current-view>false</restore-current-view>
 <layout-cacheable>true</layout-cacheable>
 <instanceable>true</instanceable>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
 <render-weight>50</render-weight>
 <header-portlet-css>/html/portlet/ext/sitemap_1/css.jsp</header-portlet-css>
 <css-class-wrapper>portlet-site-map</css-class-wrapper>
 <add-default-resource>true</add-default-resource>
 </portlet>

6.  make an entry in webapps\ROOT\WEB-INF\liferay-display.xml under <category> as follows

<category name="category.cms">
.
.
.
.
.
<portlet id="sitemap_1" />
</category>

7. Restart lifery.

you can locate your new portlet under Content Management

  1. Alberto
    May 28, 2009 at 1:58 pm | #1

    Thank you for your work.
    Hard to find this blog, but it is very good
    Thank you so much and I apologize for my English

  2. Alberto
    May 28, 2009 at 3:07 pm | #3

    Works on Liferay 5.2.3???
    Can not get it to work.

    Thank you

  3. Fill
    August 26, 2009 at 5:53 pm | #4

    Thank you for good portlet Shamzu , it`s really greate for me. I used this on my site 5.1.2 ver. But i can`t edit this. I want delete black points – bullets on the left side of site_map. Help me please! How can i do it?

  4. October 27, 2009 at 12:37 pm | #5

    Thanks for providing useful information . Can we use Google Site map in LIferay?

    • October 27, 2009 at 12:43 pm | #6

      @ Gnaniyar : I never tried it actually.

  1. May 23, 2009 at 3:24 pm | #1