We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47243
    • 30 Posts
    don't know about the right terminology.
    just want to share that.

    I'm using
    [[migxResourceMediaPath? &pathTpl=`uploads/projects/{date}_{alias}/` &createFolder=`1`]]


    in order to create dynamic folder for a specific document with the date based on publishedon
    so I would have a folder name like this : 20141116_myDocumentAlias

    but the {date} parameter doesn't exist in the snippet.
    So I edited the snippet @ line 96 just before
     $path = str_replace('{ultimateparent}', $ultimateParent, $path);


    $myDate = $resource->get('publishedon'); // arteractive hack
            $myDateTemp = date_create($myDate);
            $myDate = date_format($myDateTemp,'Ymd');
            $path = str_replace('{date}', $myDate, $path); 



    I guess will have to put it again if I update the extra. [ed. note: robotpapier last edited this post 11 years, 10 months ago.]