We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30912
    • 463 Posts
    Ah now thats a different problem (and you didnt specify which nav wink)

    We would need to as people have said view the wayfinder code - if it is indeed wayfinder, it could be a hard coded chunk in which case again we would need to see the code because if its wayfinder then it usually would take the menu title. if its hard coded again nothing will change regardless of what you specify.

    The reason itll link to the correct page is becuase its probably using its internal markup so the link is probably like this:

    <li><a href="[~[+id+]~]"  >Teen Parent Friend</a></li>


    rather than


    <li><a href="[~[+id+]~]"  >[+pagetitle+]</a></li>


    or

    <li><a href="[~[+id+]~]"  >[+menutitle+]</a></li>
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You'll have to determine how the menu is generated. Is it dynamically generated, or is it hand-coded, perhaps in a chunk?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 45856
        • 7 Posts
        Quote from: Tyreal2012 at Nov 28, 2013, 10:31 AM
        Ah now thats a different problem (and you didnt specify which nav wink)

        We would need to as people have said view the wayfinder code - if it is indeed wayfinder, it could be a hard coded chunk in which case again we would need to see the code because if its wayfinder then it usually would take the menu title. if its hard coded again nothing will change regardless of what you specify.

        The reason itll link to the correct page is becuase its probably using its internal markup so the link is probably like this:

        <li><a href="[~[+id+]~]">Teen Parent Friend</a></li>


        rather than


        <li><a href="[~[+id+]~]">[+pagetitle+]</a></li>


        or

        <li><a href="[~[+id+]~]">[+menutitle+]</a></li>

        I think this is the code you would need to see, which doesn't seem to have any problems with it, as far as I can tell. It is the nav for the Our Services page (the page with the error http://www.cfs-ab.org/our-services ), which is ID 6

        If it isn't, let me know how to find the code you are referring to.

        Seems to be dynamically generated to me, but php isn't my native language!

        <?php
        $sql = $modx->db->query( 'SELECT * FROM modx_site_content WHERE parent = 6 ORDER BY menuindex ASC');
        $size = $modx->db->getRecordCount($sql );
        $resultArray = $modx->db->makeArray( $sql );//put it into an array
        
        if ($size > 0){
          echo '<div class="profile_ind_menu">';
          echo '<ul>';
        }
        
        foreach($resultArray as $item){
        //start looping through the data array
             $profile_url = $item['alias'];
            $imageSql = $modx->db->query( 'SELECT * FROM modx_site_tmplvar_contentvalues WHERE contentid = ' . $item['id'] . ' ORDER BY tmplvarid ASC');
            $resultImageArray = $modx->db->makeArray( $imageSql);//put it into an array
            for($x = 0; $x <= -1; $x++){
                if ($x == 0){ 
                  $alias= $resultImageArray[$x]['value'];
                }elseif($x == 1){
                  //move the value to $url, last time the loop runs, it will load the url, since it has higher id than the image location
                  $imageURL = $resultImageArray[$x]['value'];
                }
            }
        
        echo '<li><a href="';
        echo $profile_url;
        echo '?phpMyAdmin=40c4beac45dt3fa96414"';
        
        if($item['id'] == $modx->documentIdentifier) {
            echo ' class="selectedness"';
        } 
        
        echo ' target="_self" >';
        echo $item['pagetitle'];
        echo '</a></li>';
        }
        
        
        if ($size > 0){
          echo '</ul>';
          echo '</div>';
        }
        ?>
        
          • 30912
          • 463 Posts
          Mine either, hence why i use wayfinder

          perhaps someone with greater knowledge would be better to help you.

          But for example one of my menus is as follows (this is also a side menu with a user definable start id.

           <div id="acc">
           [!Wayfinder? &startId=`[*LHSDocumentStart*]` &level=`2`  &outerTpl=`outerTpl` &innerTpl=`innerTpl`  !]  
          </div>


          outerTpl (wrapper)
          <ul id="left-menu"[+wf.classes+]>[+wf.wrapper+]</ul>


          innerTpl
          <ul[+wf.classes+] id="left-menu2">
          	[+wf.wrapper+]
          </ul>



          ive attached a sample of the output that it creates. Im not saying the PHP script is wrong, as theres more than one way to skin a cat in MODx but its not my forte.
            • 45856
            • 7 Posts
            Just to give some closure to this, we ended up paying a developer to take a look at it.

            The values were hard coded in the chunk that corresponded with the nav item.

            Flagged appropriate post as the answer.

            Thanks all for your input.