Getting all the TV / template variables from a speciifc document for Modx Evolution


/ Published in: PHP
Save to your folder(s)

If you want to get all the TV from a specific document


Copy this code and paste it in your HTML
  1. global $modx;
  2. $tvArray = array('link','phone'); //array of the TV names you want to retrieve
  3. $traffInfo = $modx->getTemplateVars($tvArray,'*',29);

URL: joelee.me.uk

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.