We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16863
    • 29 Posts
    I'm using contexts in a Revo (2.1.3pl) site to create a number of subdomains. I'd like to have the navigation on the subdomain pages link to the primary domain and I'm using Wayfinder (2.3.1) to generate menus.

    My Wayfinder Call
    [[!Wayfinder? &startId=`0`  &outerClass=`navList` &contexts=`web` &scheme=`full` ]]


    The problem is that the menus produced by wayfinder list the pages in my web context, but applies the subdomain of whatever page I'm on to the page URLs

    For instance, I'll be looking at http://mydomain.com and the menu will render correctly
    <ul class="navList">
    <li class="first"><a href="http://mydomain.com/" >Home</a></li>
    <li class="first"><a href="http://mydomain.com/widgets.html" >Widgets</a></li>
    <li class="first"><a href="http://mydomain.com/thingies.html" >Thingies</a></li>
    </ul>
    


    but if I'm looking at at http://subdomain.mydomain.com and the menu renders like this
    <ul class="navList">
    <li class="first"><a href="http://subdomain.mydomain.com/" >Home</a></li>
    <li class="first"><a href="http://subdomain.mydomain.com/widgets.html" >Widgets</a></li>
    <li class="first"><a href="http://subdomain.mydomain.com/thingies.html" >Thingies</a></li>
    </ul>
    


    How do I force Wayfinder to render the URLs in the correct subdomain?
      • 22303 MODX Staff
      • 10,725 Posts
      You need to configure the site_url and base_url for the web Context; otherwise, MODX assumes the context should respond on whatever HTTP_HOST the client requested and got a successful response from.
        • 16863
        • 29 Posts
        …aaaaaaaand that seems to have done the trick!
        Thank you very much.