Simply Extending Composite.Navigation.Distributed to use StartPageNode

Topics: Feature requests
Jun 30, 2011 at 7:37 AM
Edited Jun 30, 2011 at 7:37 AM

Hi,

I recently made a proposal (last posting in: http://compositec1.codeplex.com/discussions/259612), how the Composite.Navigation.Distributed function can be modified to display a navigation tree from a certain node. I regularly use it this way, because a site structure normally consists of some main branches:

Home
  - Products
    - P1
    - P2
    - P3
  - Company
    - About
    - Staff
    - Contact

So, the problem with the current Composite.Navigation.Distributed is: When you're at Home/Products/P1, then the company branch does not display. With the modified version of Composite.Navigation.Distributed you can set two function calls of Composite.Navigation.Distributed on your page: One starting at /Home/Products the other at /Home/Company. So when your're at Home/Products/P1, the company branch is still displaying and you can click deeper into it, regardless on what products page you are.

Greeting, Steschu

Coordinator
Jul 4, 2011 at 11:40 AM

>> So, the problem with the current Composite.Navigation.Distributed is: When you're at Home/Products/P1, then the company branch does not display.

Composite.Navigation.Distributed function has Expand All Boolean input parameter. If true all child elements will be expanded, so if you are on the page Home/Products/P1 , the Company branch also will be shown.

Jul 4, 2011 at 12:41 PM
Edited Jul 4, 2011 at 12:43 PM

Yes, but this parameter expands everything. What I want is something like menu blocks, each block starting at a certain node. In the block, where the current page resides, the node is expanded to the current page, other nodes are closed. And all other blocks show their "initial" position. I'll give you a full example:

Home
  - Products
    - Category1
      - Product1 
        - Downloads
      - Product2
        - Downloads
    - Category2
      - Product3
        - Downloads
    - Category3
      - Product4
        - Downloads
      - Product5
        - Downloads
      - Product6
        - Downloads
  - Company
    - Profile
    - References
      - Europe
      - Worldwide
    - Staff
  - Foot
    - Contact
    - Imprint
    - Conditions

On the left you see the full page structure, each color representing one level. On my page I'd like to have three menu blocks (1: starting at Products, 2: starting at Company, 3: starting at Foot). Let's assume, we're on the page Home/Products/Category1/Product1/Downloads, the menu should display like this (e.g. the first two blocks in a sidebar, the third somewhere in the footer of the page):

- Category1
   - Product1
     - Downloads
   - Product2
- Category2
- Category3

- Profile
- References
- Staff

Contact | Imprint | Conditions

Of course each block can have its individual formatting.

An when I change to the page Home/Company/References/Europe, the menu should display like this:

- Category1
- Category2
- Category3

- Profile
- References
  - Europe
- Staff

Contact | Imprint | Conditions

So, you cannot achive this with the Composite.Navigation.Distributed function. Of course what you could do is to build the block-parts of your page hierachy as a datatype (like the TopLinks example) and/or write some individual function which queries the site structure or the datatype. But: since it's only a very simple modification on Composite.Navigation.Distributed and web pages (at least my pages) often need a menu representation like this, I thought it's a good idea.

Jul 19, 2011 at 12:58 AM

Hi All,

I have question about TopLinks navigation.

I created some websites (with installed StarterSite). Some of them have TopLinks.

When i click EditPage amd then Preview (or use PageBrowser tool) i see ALL toplinks (from all websites) on each separated website.

For example, in my website i see my top links and StarterSite top links at the same time.

How can i leave only top links corresponded selected website?

Thanks!

Developer
Jul 19, 2011 at 7:45 AM

Hi olga_titova,

Thank you for reporting this issue. It will be fixed in one of the next builds.

In the meantime, you can try and fix it yourself :)

  1. In the Functions perspective under XSLT Functions, locate and edit the function Layout.Navigation.TopLinks.
  2. Open the Function Calls tab.
  3. Select the Filter parameter under the call to GetTopLinkXml.
  4. On the right for the Parameter Type, click the Function button.
  5. In the tree, select the function Layout.Navigation.TopLinks.ActivePageReferenceFilter and click OK. This filter function will be added under GetTopLinkXml.
  6. Now select its parameter: Page scope
  7. On the right for the Parameter Type, click the Constant button
  8. Below for the Parameter Value, select the option "Ancestor and current page (breadcrumbs)".
  9. Save the function Layout.Navigation.TopLinks.

/Vitaly

Feb 3, 2012 at 11:59 AM

Composite.Navigation.Distributed.XSLT version 1.1.8 is online with StartPage parameter.