I have a snippet which gets document IDs from the DB.
I want to out put these in a menu with Wayfinder but am having trouble getting it to work. Does anyone know the correct way of placing a PHP var within Wayfinder? Tried this but no luck:
echo '[[Wayfinder? &includeDocs=`' . $docid . '`]]';
(PS: using Revo)
EDIT: Added more code
In a nut shell, my code gets a logged in users id from sessions and finds thier access group. Ultimate goal is to display links to resources that are within their access group. This is the later part of the snippet where I have got the appropriate resource IDs and just need to out put them.
//RETRIEVE DOCUMENT GROUPS RELATED TO ACCESS GROUPS
$docgroups = "SELECT * FROM `modx_document_groups` WHERE `document_group` = '$target' ";
$docstmt = $modx->query($docgroups );
while ($docrow = $docstmt->fetch(PDO::FETCH_ASSOC)) {
$docid = $docrow['document'];
echo '[[Wayfinder? &startId=`0` &includeDocs=`' . $docid . '`]]';
}//END