We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46630
    • 40 Posts
    I have ModxRevolution 2.2.13.pl. I have enabled the "Use Friendly URLs" and "Use Friendly Alias Path" options in Settings.

    I had to create a list of the children of resource with id = 7 which is a child of resource with id = 4.

    I have created 2 chunks (the same as in the tutorial in getResources documentation).

    1. list-docs-thumb

    <div class="list-docs thumb grid">
     [[getResources?  
            &parents=`7` 
             &tpl=`list-docs-thumb-tpl`  
            &limit=`3`  
            &sortdir=`ASC`  
            &includeTVs=`1`  
            &includeContent=`1`   
            &depth=`1`  
            &sortby=`menuindex`  
            ]]  
    </div><!-- eof list-docs -->


    and

    2. list-docs-thumb-tpl

    <div>
              <h4>[[+pagetitle]]</h4>
                     <a href="[[~[[+id]]]]" title="[[+pagetitle]]">     
                     <img src="[[+tv.thumbnail_16x9:phpthumbof=`w=120`]]" alt="[[+pagetitle]]" />
                 </a>  
            <p>[[+description]]</p>   
            <hr>
    </div>  <!-- eof item -->


    After that I get the three children of the parent resource with id = 7.

    The link to the parent is:

    http://site_url/id_4_alias/id_7_alias


    However the links to the children of the resource with id 7 were wrong. The URL duplicates the alias of the resource with id 4 and id 7. It looks like this:

    http://site_url/id_4_alias/id_7_alias/id_4_alias/id_7_alias/child_of_id_7_alias


    That leads me to the 404 page.

    Can someone help me to find where I am wrong?

    Thanks

    PS. If the "Use Friendly Alias Path" option is disabled, the urls are correct.

    This question has been answered by ispasov. See the first response.

    [ed. note: ispasov last edited this post 12 years, 6 months ago.]
    • discuss.answer
      • 46630
      • 40 Posts
      The problem was missing

      <base href="[[!++site_url]]">


      in my head section. Thanks to @mark_hamstra on twitter.
        • 44234
        • 219 Posts
        Doesn't need to be un-cached, [[++site_url]] should work fine.
          Find me on Twitter, GitHub or Google+
          • 46630
          • 40 Posts
          Thanks!