We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2722
    • 11 Posts
    Hey, so I was wondering if say i have a page that has a variable [*videoid*].

    is it possible to have something like http://www.urlname.com/index.php?videoid=123456

    and it uses that for the variable?

    Thanks!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Not really. You should always use the document ID when making an internal link, [~xx~] (where xx is the desired document’s ID). Let MODx generate the correct URL.

      If you are using Friendly URLs (alias.html), then you would have the form [~xx~]?videoid=[*videoid*]

      If you are NOT using Friendly URLs (index.php?id=xx) then you’ll need to use the form [~xx~]&videoid=[*videoid*]
        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
        • 25483
        • 741 Posts
        You have to use a snippet which get’s the GET variable from your URL and then outputs it to a placeholder.

        The GET variable is just basic php, the placeholder is a piece of modx code: http://wiki.modxcms.com/index.php/API:setPlaceholder
          with regards,

          Ronald Lokers
          'Front-end developer' @ h2o Media