We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20413
    • 2,877 Posts
    @hgw PHx will parse that before your snippet. You could try calling the snippet cached
    [[getParam]]

    but better is to ditch the phx and have all that code in [!getParam!]
    <link rel="canonical" href="[(site_url)][~[*id*]~][!getParam!]" />
    

      @hawproductions | http://mrhaw.com/

      Infograph: MODX Advanced Install in 7 steps:
      http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

      Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
      http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
      • 38713
      • 91 Posts
      Ok here's an interesting one for some genius.

      I have a few different galleries on a site using gallery add on by splittingred and i am using friendly urls so thats all good and they look pretty but obviously my canonical url doesn't point to that gallery as its tag is not built into the code

      So say i'm at:
      http://www.example.com/gallery/kitchens/town+house+kitchen/

      townhouse kitchen being the gallery, this page's canonical url would show as:

      <link href="http://www.example.com/gallery/kitchens.html" rel="canonical">

      Has anyone got any thoughts as to how i could reference the gallery name in the canonical url code?

      Thanks,

      Alex
        Twitter @alexmercenary
        • 42560
        • 49 Posts
        I have this very same code:

        <link rel="canonical" href="[[~[[*id]]? &scheme=`full`]]" />


        i have 1 id to be the symlinks(index, follow) test1.html

        and 3 other ids, being:
        1 modDocument(noindex,nofollow) test2.html
        1 modSymlink(noindex,nofollow) test3.html
        1 modSymlink(noindex,nofollow) test4.html

        all 4 id says they have the same canonical.

        but the 3 ids should be pointing to my test1.html(because i have it indexed), which they dont

        In my production site, and dev site, but for 1 reason, in development site is not workin. hows that possible?