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

    another Revo issue that I can't really find an answer to.

    I had wayfinder installed and working fine. then I added "articles" for a blog. now every time I click on anything in the blog and then try to navigate somewhere else on the menu it uses the siteurl/blog as the base and adds on whatever else i click at the end. so it looks like this:

    regular: www.siteurl.com

    any other menu item: www.siteurl.com/features
    www.siteurl.com/events
    etc


    Blog: www.siteurl.com/blog

    BUT when im on the blog, and then open a blog post"

    www.siteurl.com/blog/test-blog (so url/blog/blog post alias)

    all good right? BUT THEN, when i try to click anything on the menu from the blog post, I get:

    www.siteurl.com/blog/features so its adding the /blog after the site url as the base.

    any ideas, thanks in advance, I'm an evo person and this is my first revo site so any help would be appreciated


    details:
    newest revo: 2.2.4-pl
    godaddy server-linux




    [ed. note: geekster last edited this post 11 years, 6 months ago.]
    • It sounds like you don't have a base tag in your header. When using friendly alias paths (so level1/level2/page.html or something similar; Articles uses this by default) that will cause issues like the one you're describing.

      The easiest is to add this to your header:
      <base href="[[!++site_url]]">


      but you can also change the link_tag_scheme system setting and Wayfinder's &scheme property to 'full', to have them both output complete URLs to the pages which gets rid of your problem as well.

      I'm pretty sure this behaviour hasn't changed since Evo, except in Revo you can configure the link tag scheme so you can avoid the base tag wink I think Evo might not have had the friendly alias paths on by default tho, so it wouldn't be obvious in default installations.

      PS: you might want to update to 2.2.5 - many small fixes in there that make Revo a more pleasant experience.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 37493
        • 16 Posts
        THANKS!!!! that did it.

        its these really simple things that keep tripping me up. its taking me soo long to get my first revo site up.

        anyhow, thanks, much appreciated.
        • Mark,

          Would you say that overall, even without FURL's enabled that for any MODX site the site_url placeholder should be used in templates?

          I'm asking because the only mention of this in the docs is in the FURL's section, yet I think setting the site url globally to the placeholder should be standard from the get go and mentioned in the building your site section. If not for simple ease of site transference and local development, but especially for those who aren't ready to enable FURL's just yet, and are just getting the hang of developing the MODX way with the docs.

          Best practices sort of thing, no?

          Thoughts?
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • Yes and no. Yes, when building MODX sites it's best practice and to some extend you need it.

            But no, there's other ways to solve it as well and there's one big disadvantage to the base tag which is that it breaks simple anchor references:
            <a href="#thisdoesntwork">Jump to XYZ</a>
            <a href="[[~[[*id]]]]#thisdoeswork">Jump tp XYZ</a>

            There's plugins for that (AnchorsAway pops to mind), but it's an extra step that can be annoying if you use that functionality a lot.

            Another way, which allows you to skip the base tag, is to set the link_tag_scheme to full (and Wayfinders' &scheme property cause it doesn't inherit it). You don't need the base tag if you do that.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • But the option of using the link_tag_scheme at full doesn't work if FURL's are enabled? In that case, the base tag is required? (as the docs state)

              Oh, and what's the difference between an uncached base tag and a cached base tag?
                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • A cached base tag will have its value inserted into the page head then it will be cached. If it's uncached, it will be processed at each page load. So if it changes for some reason, it needs to be uncached.
                  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