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

    I have a snippet with this code:

    require_once ('assets/files/activecalendar/source/activecalendar.php');
    
    $myurl=$_SERVER['PHP_SELF']; // the links url is this page
    $yearID=false; // init false to display current year
    $monthID=false; // init false to display current month
    $dayID=false; // init false to display current day
    extract($_GET); // get the new values (if any) of $yearID,$monthID,$dayID
    $cal = new activeCalendar($yearID,$monthID,$dayID);
    $cal->enableMonthNav($myurl);
    echo $cal->showMonth();


    I am using FURLs and the PHP_SELF reference doesn’t output the right URL. Is there some way to throw in [~[*id*]~] or something similar to make this work?
      • 22303 MODX Staff
      • 10,725 Posts
      Try:
      <?php
      $myurl= $modx->makeUrl($modx->documentIdentifier);
      ?>

        • 16382
        • 36 Posts
        Thanks OpenGeek, that did the trick!