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

    I have a tricky issue (in my opinion) and would like a solution to fix it. I am using Magellan plugin for my navigation bar. Magellan is a style-agnostic plugin that lets you give your site sticky navigation. This fixed-position navigation helps users keep track of where they are on a page without scrolling.

    How it SUPPOSES to work is that when you click the link (code below)

    <li data-magellan-arrival="overview"><a href="#overview">Overview</a></li>


    It will append the a href to your current url address. e.g http://forums.modx.com/thread?board=40#overview

    Instead it is only grabbing the base url and appending the a href e.g http://forums.modx.com/#overview

    I know it has to do with the base url in my meta tag
    <base href="[[++site_url]]" />


    When I remove the base tag, the plugin works however it breaks the site with multiple broken links and images

    I have tried

    <li data-magellan-arrival="overview"><a href="[[~[[*id]]]]#overview">Overview</a></li>


    And that breaks plugin

    I have even tried e.preventDefault() when the link is click and that didn't work.

    What can I do to get http://forums.modx.com/thread?board=40#overview instead of http://forums.modx.com/#overview?
      • 44649
      • 68 Posts
      With the base still set, does the code below generate the http://forums.modx.com/thread?board=40#overview?
      <li data-magellan-arrival="overview"><a href="[[~[[*id]]]]#overview">Overview</a></li>


      From the example in the link below it doesn't look like the #tag is appended to the URL, it simply scrolls to the div ID with #tag name (if that's the right example?)
      http://jsfiddle.net/mBSA4/show/
        • 44437
        • 74 Posts
        Ok, let us say that the current page url is http://forums.modx.com/thread?board=40

        With my base url set and my html code is
        <li data-magellan-arrival="overview"><a href="#overview">Overview</a></li>

        it generates http://forums.modx.com/#overview (this url is incorrect) BUT the Magellan works as intended.

        With my base url set and my html code is
        <li data-magellan-arrival="overview"><a href="[[~[[*id]]]]#overview">Overview</a></li>

        it generates http://forums.modx.com/thread?board=40#overview (this url is correct) BUT the Magellan does not works as intended.