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

    I’ve just drafted a sample website using MODx evo 1.0.2. I also happen to use a Macmini on which I run my own Cache DNS Server (BIND) and Apache 2.11.

    I configured (among the other sites that I host) my MODx site (let its hostname be "latestfashion") to be a virtual host:
    <VirtualHost *:80>
            ServerName latestfashion
            ServerAlias latestfashion.dyndns.org
            ServerAlias latestfashion.home
            DocumentRoot "/Library/WebServer/modx"
    </VirtualHost>


    So, when I browse to http://latestfashion.home from my home LAN, everything is ok e.g. the links all start with http://latestfashion.home

    But, when I browse to http://latestfashion.dyndns.org (no problem with the dyndns.org settings here) I get the main page but the links still keep on starting all with the "http://latestfashion.home" e.g. a link on the WayFinder is "http://latestfashion.home/index.php?id=2" whereas it should have been "http://latestfashion.dyndns.org/index.php?id=2"

    Any ideas why this happens?

    Thanks in advance.
      • 33337
      • 3,975 Posts
      Thats because Wayfinder cached the output of the menu. On first load, a page will be cached, if u access it from x.home, it will cache this, if u load it first via dynsns url, it will cache dyndns url.

      Try calling Wayfinder uncached: [!Wayfinder ......!]
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 2442
        • 11 Posts
        Thank you for the suggestion.

        The Wayfinder in my minimal template is like this:

        <div id="sidebar">
        		<ul>
        			<li id="dropmenu"><a name="dropmenu"></a><h2>Pages:</h2>
        			[[Wayfinder? &startId=`0`]]
        			</li>
        .......


        If I try any of the following:

        [[!Wayfinder? &startId=`0`!]]
        [[!Wayfinder!? &startId=`0`]]
        [![Wayfinder? &startId=`0`]!]

        It either doesn’t work or doesn’t display anything in the Wayfinder’s place
        How should I put the exclamation marks into it, or am I putting them incorrectly?
          • 33337
          • 3,975 Posts
          Its [!Wayfinder? &startId=`0`!] laugh
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 2442
            • 11 Posts
            Thank you, [!Wayfinder? &startId=`0`!] has worked. Those double brackets "[[ .. ]]" were there put by the MODx, i.e. I hadn’t done any editing on them.

            I can’t help wondering now why they were double by default, if it won’t work...
              • 33337
              • 3,975 Posts
              No, its not because they dont work, its because MODx allows you to put cached and uncached elements.

              [[snippetname? .... ]] will render once and be cached. Until cache is cleared. Thus making server load low on subsequent page renders.

              [!snippetname? .... !] will always load the results dynamically and will never cache.

              Both ways are correct and usage of both depends on the requirements.
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link