Hi all,
i’m trying to make a TV thats will list all pages of a parent.
i want the parent to be a variable. so how would i do this
if ($LNG==’NL’) @SELECT `pagetitle` AS `name`,`id` FROM `[[+PREFIX]]site_content` WHERE `parent` = 2 AND `deleted` = 0
else if ($LNG==’EN’) @SELECT `pagetitle` AS `name`,`id` FROM `[[+PREFIX]]site_content` WHERE `parent` = 53 AND `deleted` = 0
any idea how to do this?
tnx
Ralph
you can create a snippet which returns what your need and use it like that:
@EVAL return $modx->runSnippet('yoursnippet',array('param1'=>'value1','param2'=>'value2'));