We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17304 ☆ A M B ☆
    • 13 Posts
    Hi -

    Here’s mySnippet:
    <?php
    $id = $_GET['id'];
    
    $output = $id;
    
    return $output;


    I use it like this:
    @EVAL return $modx->runSnippet('mySnippet');


    in a TV

    I expect it to simply return the id of the document being edited (in the manager). But it simply comes back blank.
    Is there a reason for this? What am I doing wrong? How can I access the id of the document being edited in the manager, in a snippet, so that I can use it to build dynamic values in a TV???
    I am puzzled..



      • 6228
      • 249 Posts
      Couldn’t you just use [tt]$modx->resource->get(’id’)[/tt] ?
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development