We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44773
    • 4 Posts
    I have an ajax call that I am working to load more posts for a blog. Basically I have the following code.
    [[!ArticleSectionSlug? &override=`[[!getResourceField? &id=`[[+id]]` &field=`Category` &isTV=`true`]]`]]

    When I run this string (Its larger in the end but this shows the concept) It exports to the browser as:
    [[!ArticleSectionSlug? &override=`[[!getResourceField? &id=`1363` &field=`Category` &isTV=`true`]]`]]

    As you can see it only changes the id variable and doesn't render the snippet as I need. I do run the code through the following to try and get it to parse as I found on other posts and no luck.
    $chunk = $modx->newObject('modChunk',array('name'=>'{tmp}-{'.uniqid().'}'));
    $chunk->setCacheable(false);
    $output = $chunk->process(array('id'=>$id),$stringToConvert);
    

    Can anyone point me in the right direction on this?