1 2 Previous Next 16 Replies Latest reply on Dec 17, 2007 10:31 AM by Martin Rostan

    CMS Content - Navigate between pages

    Srinidhi Srishailan Newbie

      My portal server is Jboss 2.6 and my requirement is to display CMS content on the portal page and the CMS content which is a html doc will have links to other pages.
      For example I have two HTML Docs - NewsHeadlines.html and NewsDetails.html. There is a link on NewsHeadlines.html which should show the NewsDetails.html.

      I created a folder called news using the management portlet and uploaded the above mentioned html docs.

      My code in the *-object.xml to show the cms content is

       <window>
       <window-name>News</window-name>
       <content>
       <content-type>cms</content-type>
       <content-uri>/news/NewsHeadlines.html</content-uri>
       </content>
       <region>left</region>
       <height>0</height>
       </window>
      


      NewsHeadlines.html is displayed on my portal without any issues. But the link within the NewsHeadlines.html is taking me to the default portal.
      The URL of the link is given as news/NewsDetails.html.

      Am I missing something. Should I configure something to open the links in my portal window ? Any help on this is highly appreciated.

      Thanks
      Nidhi


        • 1. Re: CMS Content - Navigate between pages
          Michael Martinsen Newbie

          Hi

          I have a similar setup. I use a window to display some CMS doc using:

           <window>
           <window-name>TestWindow</window-name>
           <content>
           <content-type>cms</content-type>
           <content-uri>/default/index.html</content-uri>
           </content>
           <region>center</region>
           <height>0</height>
           </window>
          


          This displays this CMS doc /default/index.html.

          If you need to link to other docs (or images as I do) your links should look like:

          /portal/content/default/images/myimage.gif
          


          /Michael

          • 2. Re: CMS Content - Navigate between pages
            Srinidhi Srishailan Newbie

            Images are working fine. Issue is with linking to a html doc.

            Are you able to navigate to a diff CMS content (any html doc) ?

            • 3. Re: CMS Content - Navigate between pages
              Michael Martinsen Newbie

              Nidhi,

              I stand corrected! That doesn't seem to work.
              I can however make the following work. When you edit the file in the CMS editor use:

              default/support.html


              /Michael


              • 4. Re: CMS Content - Navigate between pages
                Srinidhi Srishailan Newbie

                So jboss portal 2.6 does not support this. There is no way to navigate to another CMS content within in the same CMS window ?

                • 5. Re: CMS Content - Navigate between pages
                  Sohil Shah Master

                  nidhi-

                  To navigate to different cms docs and stay on the same window and just change the cms content of that window,

                  try if you can set that window up as content-type 'portlet' and add this window to the default portal page.

                  There is some command mapping needed if you want to set this cms portlet up on a non-default portal page.

                  Hope this helps

                  Thanks

                  • 6. Re: CMS Content - Navigate between pages
                    Srinidhi Srishailan Newbie

                    I did not quite understand. Sorry about this. Could you please give me more details on this.

                    Should I change the content-type from "cms" to "portlet" . After I made this change none of the cms content is displayed.

                    • 7. Re: CMS Content - Navigate between pages
                      Sohil Shah Master

                      nidhi-

                      after looking through the thread looks like you are not missing any thing.

                      what is happenig is your /news/NewsHeadlines.html is being displayed properly on the designated page in the portal. However, when you click /news/NewDetails.html, is falling into the "default" page of the 'default" portal.

                      Its kind of similar to doing http://localhost:8080/portal/content/news/NewsDetails.html.

                      What you need to do is map /news to go to your designated page using the CommandMapping Framework similar to the way /content is mapped. This is not trivial.

                      A simpler fix would be to use the "default" page of the "default" portal. Set that page up exactly the way your News page is setup, and access like this:

                      /content/news/NewsHeadline.html which will keep you on the same window.

                      Thanks

                      • 8. Re: CMS Content - Navigate between pages
                        Srinidhi Srishailan Newbie

                        I understood your point. But I have more than one page with cms content in it. For example news and documentation. The link in each page should open in their respective cms windows. How is this possible with the simpler fix that you mentioned.

                        Thanks
                        Nidhi

                        • 9. Re: CMS Content - Navigate between pages
                          Sohil Shah Master

                          nidhi-

                          It is not possible with the simpler fix.

                          In fact I was just testing the CommandMapping to url context approach and that seems to be deprecated in 2.6 as well.


                          Can you give me details on how your portal pages are setup and what your NewsHeadlines.html and NewsDetails.html links look like when clicked.

                          I am looking for values in the browser url portion

                          Thanks

                          • 10. Re: CMS Content - Navigate between pages
                            Srinidhi Srishailan Newbie

                            NewsHeadLines.html is in HOME page under the window name - News

                            http://localhost:8080/portal/ieportal/HOME

                            On click on link in NewsHeadLines.html the URL in the browser is

                            http://localhost:8080/content/news/details.html

                            • 11. Re: CMS Content - Navigate between pages
                              Srinidhi Srishailan Newbie

                              NewsHeadLines.html is in HOME page under the window name - News

                              http://localhost:8080/portal/ieportal/HOME

                              On click on link in NewsHeadLines.html the URL in the browser is

                              http://localhost:8080/content/news/details.html

                              • 12. Re: CMS Content - Navigate between pages
                                Michael Martinsen Newbie

                                Nidhi,

                                Maybe I am missing the problem here, but from your first topic I understood that you want' to add a window with CMS content to a page and then be able to click a link that will show another CMS document WITHIN the same window.

                                From later topics I understand that the problem is that you are not using the default portal, and when you click the link, you're taken back to the default portal? Is that right?

                                In my portal I have 2 CMS docs, one has a link to the other. I can add a window to the default portal; this window has a content of type CMS which points to CMS file A.

                                In the file A, I create a link using:

                                default/B.html


                                This works, and file B is shown in the same window in the default portal.

                                I have also tried to create another portal, and add a new page with a window with CMS content (file A again). When I click this link file B is shown - in the same window within the correct portal.

                                Is that what you wan't to do?

                                /Michael

                                • 13. Re: CMS Content - Navigate between pages
                                  Srinidhi Srishailan Newbie

                                  From later topics I understand that the problem is that you are not using the default portal, and when you click the link, you're taken back to the default portal? Is that right?

                                  Yes

                                  I have also tried to create another portal, and add a new page with a window with CMS content (file A again). When I click this link file B is shown - in the same window within the correct portal.

                                  Is that what you wan't to do?


                                  I am trying to achieve exactly the same and it always takes me to the default portal . Which version of Jboss portal are you using ?
                                  Can you tell me what is the name of your portal, page and window ?
                                  The reason I am asking is in portal-cms.sar\META-INF\jboss-service.xml file the following entry causes the CMS content to be shown in the default window always.

                                   <mbean
                                   code="org.jboss.portal.core.cms.CMSObjectCommandFactoryService"
                                   name="portal:commandFactory=CMSObject"
                                   xmbean-dd=""
                                   xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
                                   <xmbean/>
                                   <attribute name="TargetWindowRef">default.default.CMSWindow</attribute>
                                   <depends
                                   optional-attribute-name="CMSService"
                                   proxy-type="attribute">portal:service=CMS</depends>
                                   <depends
                                   optional-attribute-name="ServerConfig"
                                   proxy-type="attribute">portal:service=ServerConfig</depends>
                                   </mbean>
                                   <mbean
                                   code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
                                   name="portal:commandFactory=Delegate,path=content"
                                   xmbean-dd=""
                                   xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
                                   <xmbean/>
                                   <attribute name="Path">/content</attribute>
                                   <depends
                                   optional-attribute-name="DelegatingFactory"
                                   proxy-type="attribute">portal:commandFactory=Delegating</depends>
                                   <depends
                                   optional-attribute-name="DelegateFactory"
                                   proxy-type="attribute">portal:commandFactory=CMSObject</depends>
                                   </mbean>
                                  
                                   <mbean
                                   code="org.jboss.portal.core.cms.CMSObjectURLFactory"
                                   name="portal:urlFactory=CMSObject"
                                   xmbean-dd=""
                                   xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
                                   <xmbean/>
                                   <attribute name="Path">/content</attribute>
                                   <depends optional-attribute-name="Factory" proxy-type="attribute">portal:urlFactory=Delegating</depends>
                                   </mbean>
                                  


                                  When I add separate entries for each CMS window my issue is resolved . But I am not sure if this is the right approach.


                                  • 14. Re: CMS Content - Navigate between pages
                                    Michael Martinsen Newbie

                                    I'm using JBoss Portal 2.6.1 on a JBoss AS 4.0.5.

                                    I have a portal called testportal, a page called news and the window with the CMS content is called News.

                                    I have compared your snippet from jboss-service.xml with the the one in my installation and they are identical.

                                    /Michael

                                    1 2 Previous Next