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

    I found serveral topics regarding URL’s, can’t seem to find the specific awnser.

    I basicly would like to see the complete path within the source code of an page. I use revolution 2.1.3, friendly URL’s turned on in the .htaccess. Within all documents and templates i use hyperlinks like this [[~ID]]. I found a simple solution to add [[++site_url]] before [[~ID]]. Is there anyway to configure this so that i (and simple contentmanagers) don’t have to add [[++site_url]]?

    I mainly would like the absolute path for searchengines: href="www.domain.com/location" and not only href="/location". I don’t need the absolute path for images etc.

    Hope someone can help me!

    Gr,

    Erwin
      • 33997
      • 150 Posts
      So far as I know, WayFinder has a setting for that for use within WF, but links inside a page there is no way except using what you already use. If you want to make it easier for users, make a chunk with [[++site_url]] in it and name it something simple, like [[$URL]] or something.

      Alternatively, you could probably write a simple snippet to handle this for you, where you pass the page ID as a parameter to the snippet, making your whole life easier. If someone writes such a snippet, I’d appreciate a copy. Something where you could type [[url?13]], and the snippet grabs the 13 and drops in the [[++site_start]][[~13]] instead. That may work pretty easily.

      Hope that helps...
        "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
        • 35545
        • 35 Posts
        Quote from: goonz at Jul 25, 2011, 06:17 PM

        ....
        Hope that helps...

        Partly... i got confirmation on what i already suspected. Really hoped it would be a little more friendly to fix this. For SEO reasons i need absolute URL’s.

        Anyone else?
          • 22303 MODX Staff
          • 10,725 Posts
          Link tags:
          [[~13? &scheme=`full`]]

          When using placeholders:
          [[~[[+id]]? &scheme=`full`]]

          There is also a system setting now for the default scheme to be used when rendering any link tags (i.e. no &scheme=`full` required). The setting is called link_tag_scheme (URL Generation Scheme) and defaults to -1 (relative URL generation). See http://api.modx.com/revolution/2.1/_model_modx_modx.class.html#%5CmodX::makeUrl() for valid scheme options.
            • 33997
            • 150 Posts
            Awesome. Thanks Jason.
              "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
              • 35545
              • 35 Posts
              Quote from: OpenGeek at Jul 27, 2011, 11:01 AM

              Link tags:
              [[~13? &scheme=`full`]]

              When using placeholders:
              [[~[[+id]]? &scheme=`full`]]

              There is also a system setting now for the default scheme to be used when rendering any link tags (i.e. no &scheme=`full` required). The setting is called link_tag_scheme (URL Generation Scheme) and defaults to -1 (relative URL generation). See http://api.modx.com/revolution/2.1/_model_modx_modx.class.html#%5CmodX::makeUrl() for valid scheme options.

              Official my god from now!