1 Reply Latest reply on Feb 2, 2006 1:16 AM by davinchi

    cms portlet problem

    hr_k

      Hi

      I am using jboss-portal-2.2.1RC2 and Mysql.

      My question is how to configure the cmsportlet to display a html file created in the content repository.

      I would like to do this using the cms admin and management pages.

      Thanks.

      Kasper Odgaard

        • 1. Re: cms portlet problem
          davinchi

          You need to do 2 things
          1) Log in using admin/admin and use the CMSAdmin portlet
          Create a folder /MyFolder/MyPage

          2)Now create an instance of CMSPortlet in the page that you want

          Use the following steps:
          a)In portlet.xml

          <portlet>
           <portlet-name>MyCMSPortlet</portlet-name>
           <portlet-class>org.jboss.portal.core.portlet.cms.CMSPortlet</portlet-class>
           <init-param>
           <description>Default path to index page.</description>
           <name>indexpage</name>
           <value>/MyFolder/MyFile</value>
           </init-param>
           <supports>
           <mime-type>text/html</mime-type>
           <portlet-mode>VIEW</portlet-mode>
           </supports>
           <portlet-info>
           <title>CMS</title>
           </portlet-info>
          </portlet>
          


          b)In *-object.xml (corresponds to your portal name)
          Place the instance of the portlet at the correct location


          <deployments>
           <deployment>
           <if-exists>keep</if-exists>
           <instance>
           <instance-name>CMSPortletInstance</instance-name>
           <component-ref>helloworld.MyCMSPortlet</component-ref>
           </instance>
           </deployment>
          </deployments>
          


          also do the page - portlet instance mapping

          c)copy jboss-portlet.xml from your portal-core.sar and place it in your web-inf directory

          and voila !!
          dvinci