We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Not really the same question but it’s related : in the modx tags list, I didn’t find the way to retrieve the path to the current document
    , something like [(alias_path)]... how do I get that ?

    The reason is I have a footer with a validation link and I’d like something like :

    <a href="http://validator.w3.org/check?verbose=1&uri=[(alias_path)]">valid XHTML</a> 


    It’s certainly straightforward but if you could help me ?
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l&#39;outil id
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: davidm at Feb 18, 2006, 11:22 AM

      Not really the same question but it’s related : in the modx tags list, I didn’t find the way to retrieve the path to the current document
      , something like [(alias_path)]... how do I get that ?

      The reason is I have a footer with a validation link and I’d like something like :

      <a href="http://validator.w3.org/check?verbose=1&uri=[(alias_path)]">valid XHTML</a> 


      It’s certainly straightforward but if you could help me ?

      There is no current way to do that with a tag, other than [~[*id*]~], though I believe you’d need to do it this way to portably support this regardless of your friendly alias url and use alias path settings.
        • 6726
        • 7,075 Posts
        Thanks Jason Mark (uh sorry, really tired...) !

        I tried to reconstruct the path with [(site_url)][~[*id*]~], but it would not work to get folder/page.html or any hierarchical url for that matter... Then I realized my own stupidity about the validation link rolleyes

        You just need http://validator.w3.org/check?uri=referer (I am REALLY tired !)

        lol
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l&#39;outil id
          • 15914
          • 145 Posts
          Quote from: davidm at Feb 18, 2006, 04:49 PM

          You just need http://validator.w3.org/check?uri=referer

          I have found that link doesn’t work for people who have ZoneAlarm or Norton Internet Security installed because it masks the referrer information.

          Quote from: davidm at Feb 18, 2006, 04:49 PM

          (I am REALLY tired !)

          Have a coffee... it’s on the house. laugh
            Kunal Kapoor
            Technical Director
            Limesharp Internet Limited - Effective, Functional, Standards Compliant

            IRC Nick: KingKoopa
            Skype ID: KingKoopa16
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: davidm at Feb 18, 2006, 04:49 PM

            Thanks Mark !
            No problem, but don’t call me Mark... laugh

            Quote from: davidm at Feb 18, 2006, 04:49 PM

            I tried to reconstruct the path with [(site_url)][~[*id*]~], but it would not work to get folder/page.html or any hierarchical url for that matter...
            Don’t prepend [(site_url)] to the link tag; these [~~] tags will automatically prepend the site’s base_url value to the link when processed, just like $modx->makeUrl() will. And it should also resolve any alias path according to your site’s use_alias_path setting.
              • 6726
              • 7,075 Posts
              Quote from: OpenGeek at Feb 18, 2006, 06:43 PM
              No problem, but don’t call me Mark... laugh

              Sorry tongue
              Fixed !

              Quote from: OpenGeek
              Don’t prepend [(site_url)] to the link tag; these [~~] tags will automatically prepend the site’s base_url value to the link when processed, just like $modx->makeUrl() will. And it should also resolve any alias path according to your site’s use_alias_path setting.

              Hmmm, strange, when I used [~[*id*]~] alone, I only got something like aliasofpage.html and no base url (I got base href defined in my template...). Where did I go wrong there ?

              Quote from: Kunal at Feb 18, 2006, 05:04 PM
              I have found that link doesn’t work for people who have ZoneAlarm or Norton Internet Security installed because it masks the referrer information.

              Good catch, but I’ll go with that for now, maybe I’ll add a warning to firewall’s user in the link’s title... or in the site FAQ.

              Quote from: Kunal
              Have a coffee... it’s on the house. laugh

              Thanks Kunal laugh

              A good night of sleep is more effective DONE
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id