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

    I’m new to ModX (tried some early versions of Etomite way back), and am really liking it. I am however having a problem with the DropMenu snippet. I took the standard default template and simply reformatted it to make the code neater and more to suit the way I like to work, and saved it with a new name. I then created a new page with some nonsense text just to see how it all came out.

    However, new pages appear to have a glitch. When the new page based on the new template loads, there is no bullet with the "Login" link next to it. If I move my mouse over other links in the menu however, the bullet will appear, but no link. The page is set to "public" also by the way. I also have downloaded and installed the latest version of ModX.

    When viewing the source code of the page, it turns out there is a list item for the "Login" link, only the actual text for the link that should appear in the page isn’t there, and has no title either. The output I’m getting is:

    <li class="last"><a href="id_login.html" title=""></a></li>

    Can someone tell me where I can find the applicable source code to analyze this more closely? I looked through the snippet itself and believe that it’s something to do with the "$itm$desc" output in the following:

    // TO DO: set description to the first non-empty of an array of options
    if ($showDescription && (!empty($child[’$descriptionField’]))) {
    $desc = " &ndash; ".$child[’$descriptionField’];
    } elseif ($showDescription && (!empty($child[’description’]))) {
    $desc = ’ &ndash; ’ . $child[’description’];
    } elseif ($showDescription && (!empty($child[’introtext’]))) {
    $desc = ’ &ndash; ’ . $child[’introtext’];
    } elseif ($showDescription && (!empty($child[’longtitle’]))) {
    $desc = ’ &ndash; ’ . $child[’longtitle’];
    } else {
    $desc = ’’;
    }

    $output .= "<li$class>$itm$desc</li>$ie";
    $class = ’’;

    I simply don’t know enough about how ModX works to know what I should be modifying to correct this. Also, here would I look to add or remove that Login link from the menu if I wanted to do that? Any help would be greatly appreciated.

    Sean

    -------------------------

    UPDATE

    OK...before anyone bothers, I feel silly. I just happened across the Template Variables and Template Access permissions under the resource management section. I checked the box allowing my new template to use the loginName variable and all is well with the appearing link. I thought I had looked over every art of ModX. Sorry everyone.