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,

    After many tests, the problem below seems due to be a bug of Wayfinder:
    $activeParentRowTpl does not work if $level=1 is specified, like if Wayfinder was blocked at the parent level and could not go deep to the child level to discover is the parent is the "active" parent or not.

    All works fine if I remove "$level=1;" from the configuration file.


    Hi all,

    I’m trying to configure a simple (one-level) Wayfinder menu and encountering problems.
    Although I’ve sometime been configuring successfully complex Wayfinder menus, I can really not understand what happens this time. Maybe I forgot how Wayfinder works.

    The document structure is like this:

    categories (1)
    |--categoryOne (2)
    |--categoryTwo (3)
    |--categoryThree (4)
    |--categoryFour (5)
    |--document(6)

    The menu has only one level and should display documents 2 to 5, i.e. categories.

    All links should be displayed in blue.
    The "active parent" (i.e. document 5 when diplaying document (6) should be in white and not a link.

    "Mouseovered" links are yellow. This works and proves that the menu config and the stylesheet are called as expected.

    But the "active parent" is not displayed in white like I would.

    Wayfinder menu configuration file:
    <?php
    
    $startId=1;
    $level=1;
    $displayStart=FALSE;
    
    // Because the CSS code for the menu was pasted at the end of Maxigallery's stylesheet.
    $cssTpl = '@CODE:<link rel="stylesheet" media="all" type="text/css" href="assets/snippets/maxigallery/css/default.css" />';
    
    $outerTpl = '@CODE:
    <ul id="menu_realisations" style="background-color:yellow" >
    [+wf.wrapper+]
    </ul>';
    
    // How documents that are folders should display.
    $parentRowTpl = '@CODE:<li><a  href="[+wf.link+]" title="[+wf.linktext+]" style="background-color:red">[+wf.linktext+]</a></li>';
    
    // How parents of current document should display.
    $activeParentRowTpl = '@CODE:<li class="categorie_active" style="color:#ffffff">[+wf.linktext+]</li>';
    
    ?>


    The end of my CSS file:
    /* menu */
    #menu_realisations {
    margin-left:63px;
    padding:0;
    background:transparent;
    list-style-type:none;
    text-transform:uppercase;
    text-align:left;
    font-family: "DejaVu Sans Condensed", "Franklin Gothic Medium", Helvetica, Arial, Verdana, sans-serif;
    font-size:11pt;
    }
    
    #menu_realisations li {
    	margin:0;
    	padding:0;
    }
    
    #menu_realisations li a {
    	margin:0;
    	color:#0033ff;
    	text-decoration:none;
    }
    
    #menu_realisations li a:hover {
    	color:#ffcc33;
    }
    
    #menu_realisations li.categorie_active {
    	margin:0;
    	padding:0;
    	color:#ffffff;
    }


    In above config file, the yellow background color is used and but not the red one.
    I observe that when document 6 is selected, $outerTpl is used but not $parentRowTpl nor $activeParentRowTpl.

    Strangely, when replacing $parentRowTpl by $rowTpl, the second chunk is used.

    But I cannot find the way to display in white the name of document number 5: the third chunk is never used.

    Who can help ?

    Thanks a lot.