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

    Well, this morning at 11:43 am, (according to the MODx log) I deleted a custom wayfinder snippet my client was using. While checking under my resources tab (resources->assets->snippets) I found a wayfinder snippet that includes wayfinder.inc.php and wayfinder.documentation.html. I thought I could just copy the info in wayfinder.inc.php, create a new snippet under resources (resources->manage resources -> snippets) and be done with it. Unfortunately the "new" Wayfinder does not work.
    In fact my all my web pages are missing the code below. I think this code controls the navigation for the site. I tried to paste the code into one of my webpages but it didn’t work.

    Does anyone have an idea about what is going on? When I deleted the snippet did it delete from any global functions? Do I have to update the templates? Please help.
    *** The missing code is below.


    <style>
    #sideNavigation
    {
    clear: both;
    display: block;
    /* float: left; */
    padding: 16px 0px 48px 0px;
    width: 172px;
    }

    #sideNavigation h3
    {
    background: url(/assets/images/sideNav_category.gif);
    cursor:pointer;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
    height: 18px;
    margin: 0px;
    padding: 2px 0px 0px 5px;
    width: 167px;
    }

    #sideNavigation h3 a
    {
    color: #FFFFFF;
    text-decoration: none;
    }

    #sideNavigation h4
    {
    background-color: #CBCBCB;
    background-image: url(/assets/images/sideNav_subItem.gif);
    cursor:pointer;
    color: #9D85B7;
    font-size: 12px;
    font-weight: bold;
    height: 18px;
    margin: 0px;
    padding: 2px 0px 0px 5px;
    width: 167px;
    }

    #sideNavigation h4 a
    {
    color: #9D85B7;
    text-decoration: none;
    }

    #sideNavigation .sideNavPanel_body
    {

    }

    #sideNavigation .sideNavPanel_body_active
    {

    }

    #sideNavigation .Active
    {

    }

    .sideNavLevel1
    {
    border-style: solid;
    border-width: 0px;
    padding: 0px 0px 5px 0px;
    }

    #accordion {
    border: 1px solid #1F669B;
    width: 300px;
    font-family: Trebuchet MS, Arial, Helvetica, sans-serif;
    font-size: 11px;
    }
    .ttth3 {
    font-size: 12px;
    padding: 4px 6px 4px 6px;
    margin: 0;
    border-style: solid none solid none;
    border-top-color: #BDC7E7;
    border-bottom-color: #182052;
    border-width: 1px 0px 1px 0px;
    color:#fff;
    background-color: #63699C;
    cursor:pointer;
    }
    #visible {
    color:#CED7EF;
    background-color: #63699C;
    }
    #panel1, #panel2, #panel3, #panel4 {
    /* margin: 0;
    padding-bottom: 0;
    border: none; */
    }

    </style>
    <script type="text/JavaScript">
    var fSize;

    function changeStyleProperty(elementId, styleName, styleValue1, styleValue2)

    {

    if(document.getElementById(elementId).style[styleName] == styleValue1)

    {

    document.getElementById(elementId).style[styleName] = styleValue2;
    fSize = styleValue2;


    }

    else

    {

    document.getElementById(elementId).style[styleName] = styleValue1;
    fSize = styleValue1;


    }

    }




    function changeNavCategoryState(elementId, theState)
    {
    var selectedElement = document.getElementById(elementId);
    if(theState == "on")
    {
    selectedElement.style.backgroundImage = "url(/assets/images/sideNav_category_o.gif)";
    }
    else
    {
    selectedElement.style.backgroundImage = "url(/assets/images/sideNav_category.gif)";
    }
    }

    function changeNavSubItemState(elementId, theState)
    {
    var selectedElement = document.getElementById(elementId);
    if(theState == "on")
    {
    selectedElement.style.color = "#504F4F";
    }
    else
    {
    selectedElement.style.color = "#9D85B7";
    }
    }

    function accordion(el) {
    // if the selected item is already visible, hide and rename it.
    // clear the global variable
    if ($(’visible’) != undefined && $(’visible’).id == el.id)
    {
    var elup = $(’visible’).parentNode.id+’-body’;
    new Effect.Parallel([new Effect.SlideUp(elup)], {duration: 0.1});
    $(’visible’).id = $(’visible’).parentNode.id.replace("sideNavPanel","sideNavCategory");
    return;
    }

    // if another element was clicked other than what is already visible,
    // slide down the selected item, slide up the previously visible element,
    // if there was one
    var eldown = el.parentNode.id+’-body’;
    if($(’visible’) != undefined)
    {
    var elup = $(’visible’).parentNode.id+’-body’;
    new Effect.Parallel([new Effect.SlideUp(elup), new Effect.SlideDown(eldown)], {duration: 0.1});
    $(’visible’).id = $(’visible’).parentNode.id.replace("sideNavPanel","sideNavCategory");
    }
    else
    {
    new Effect.Parallel([new Effect.SlideDown(eldown)], {duration: 0.1});
    }
    el.id = ’visible’;
    }

    function init() {

    // hide all elements apart from the one with id visible
    var acc = document.getElementById(’sideNavigation’);
    var apanels = acc.getElementsByTagName(’div’);
    for (i = 0; i < apanels.length; i++) {
    if (apanels[i].className == ’sideNavPanel_body’) {
    apanels[i].style.display = ’none’;
    }
    }
    // var avis = document.getElementById(’visible’).parentNode.id+’-body’;
    // document.getElementById(avis).style.display = ’block’;
    }
    function addEvent(elm, evType, fn, useCapture) {
    elm["on"+evType]=fn;return;
    }

    addEvent(window, "load", init);
    </script>