7 Replies Latest reply on Jan 9, 2007 12:42 PM by xmhr

    Adding subpages

    mazloumi

      Hi,

      In the user guide it is mentioned that you can also add sub pages but I was not able to find anything that allows me to do so.

      Can someone kindly explain if that is possible?

      Thanks,
      Nima

        • 1. Re: Adding subpages

          a subpage is not different from any other page.
          The 'sub' comes from what you define as the parent of the page.
          The parent can be a portal, or another page. In case of the parent being a page, you have your subpage.

          • 2. Re: Adding subpages
            nmazloumi

            In the management portlet when I click on a node of type page I can only add a portlet instance to a region, destroy the page or click on "Manager", "Properties", "Security" and "Theme".

            Where can I add a "sub"-page to my page?

            Thanks

            • 3. Re: Adding subpages

              I haven't tried it with the management UI. I use the *-object.xml to define the pages I work with..... If it's not available in the UI, it needs to be added as a feature request....(JIRA)

              • 4. Re: Adding subpages
                nmazloumi

                Can you kindly post an example fragment of the *-object.xml file with several level of pages? How does JBoss Portal render them? As a second nav bar or menu?

                • 5. Re: Adding subpages

                  Look at the test page for an example of that.

                  The default portal comes with a top level page called 'Test' that shows up in the tabbed navigation. IF you select that page, you'll see a set of subpages in menu portlet on the left hand side of the screen. These are the children (pages) of the Test page.

                  The object descriptor for these pages is in the core package, and there in the portal-samples-war (WEB-INF/default-object.xml)

                  effectively there are two ways to achive the hierarchie
                  1) use the paret-ref element in the descriptor to define a deployment object and point to its parent via that element. The value must point to a valid and existing object in the portal object tree (portal or page), like:

                   <!-- create a page called 'Test' that is a child of the 'default' portal -->
                   <deployment>
                   <parent-ref>default</parent-ref>
                   <if-exists>keep</if-exists>
                   <page>
                   <page-name>Test</page-name>
                   .......
                   </page>
                   </deployment>
                   <deployment>
                   <!-- create a sub page of the 'Test' page in the 'default' portal
                   <parent-ref>default.Test</parent-ref>
                   <if-exists>keep</if-exists>
                   <page>
                   <name>MySubPage</name>
                   ............
                  


                  2) create the hierarchie directly in the page definition

                  <deployments>
                   <deployment>
                   <parent-ref>default</parent-ref>
                   <if-exists>keep</if-exists>
                   <page>
                   <page-name>Test</page-name>
                   <window>
                   <window-name>CatalogPortletWindow</window-name>
                   <instance-ref>CatalogPortletInstance</instance-ref>
                   <region>left</region>
                   <height>1</height>
                   </window>
                   <page>
                   <page-name>event test</page-name>
                   <window>
                   <window-name>NavigationPortletWindow</window-name>
                   <instance-ref>NavigationPortletInstance</instance-ref>
                   <region>navigation</region>
                   <height>0</height>
                   </window>
                   </page>
                   </page>
                   </deployment>
                  </deployments>
                  




                  • 6. Re: Adding subpages
                    nmazloumi

                    thank you

                    • 7. Re: Adding subpages

                      2 mholzner
                      Hi,
                      Can You explain differences between this two ways of subpage creating? Which of them is preffered to use and why?