We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21800
    • 174 Posts
    hi folks,

    to do an iCal-feature to offer event data for a personal calendar (thunderbird calendar, ...) using this idea which I had also
    http://modxcms.com/forums/index.php?topic=29970.0

    So I want to offer a (download) link for this data for each event. The problem is for me to hand over the page id of the "event page" (witch has a link to the page witch delivers the data in iCal format (iCal.html).

    i. e.
    it is easy to add the "event page" id to the link to iCal.html like ".../iCal.html#175". But till now and long searches on modx I did not manage to pull the value "175" in this example out of the url to use it in a ditto call.

    I think there is surely a solution, I do not see yet ... (for this is one more case I crash into this problem)
    any help is appreciated
      • 4310
      • 2,310 Posts
      You could try the Ditto Request Extender assets/snippets/ditto/extenders/request.extender.inc.php ( I haven’t used it yet )
      Or add &pageid=175 to your link url and have a little snippet retrieve the pageid value on your landing page :
      <?php
      $val = $_REQUEST['pageid'];
      return $val;
      ?>
        • 3749
        • 24,544 Posts
        I think you could also use a snippet to set a $SESSION variable with the page id and then another snippet to read and return it. smiley

          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 21800
          • 174 Posts
          I love MODx and its community
          the little snippet from bunk58 did it. Great and thanks very much also to BobRay.
          I try to avoid cookies so I prefer the the REQUEST version.

          Ok, the next problem ... http://modxcms.com/forums/index.php/topic,35644.msg215460.html#msg215460