We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15001
    • 697 Posts
    Hi,

    I’m trying to find the best way to do some special Wayfinder configuration for a treeview and need some help.

    The situation :
    1) multilingual site with one "root" folder for each language (fr, de, en, ...)
    2) several product categories in each language
    3) sub-levels for each product category

    Currently, the treeview is like this :
    fr
    |-+-Product category 1
    |-Product category 2
    | |-Subcategory 2.1
    | |--Product 2.1.1
    | |-+-Subcategory 2.2
    |-+-Product category 3


    I would like the treeview to be like this (i.e. the root is the current category):
    Product category 2
    |-+-Product category 1
    |-Subcategory 2.1
    |-- Product 2.1.1


    The need :
    - Treeview representation for each product category
    - The treeview root for all pages belonging to a category should be the node corresponding to the category itself.[/u]

    In order to avoid using one template per category nor using template variables, what I want is to tell to Wayfinder:
    "Find the root of the whole site and go down 2 levels to find the correct root !"
    Possible ?

    I use the jQuery treeview : http://jquery.bassistance.de/treeview/demo/.
    My current Wayfinder configuration file is :
    <?php
    $startId=49;
    $displayStart=TRUE;
    $ignoreHidden=TRUE;
    
    $startItemTpl = '@CODE:<span>[+wf.linktext+]</span>[+wf.wrapper+]';
    
    $outerTpl = '@CODE:
    <ul id="red" class="treeview-red">
    [+wf.wrapper+]
    </ul>';
    
    $innerTpl = '@CODE:
    <ul>
    [+wf.wrapper+]
    </ul>';
    
    $rowTpl = '@CODE:<li><span>[+wf.linktext+]</span>[+wf.wrapper+]</li>';
    
    ?>

    Thanks for any help.