charger15 Reply #1, 1 year, 10 months ago
Hi everyone,
I hope this is the right place to post my concern.
I try to convert the Navigator snippet (http://modxcms.com/extras/package/?package=314) for Revo. I first tried to find all the place where I think I need to replace code. I then started translating the code, for example as follows:
was translated to
Is it correct this way?
Now I'm stuck with more complex queries like in the following function:
If someone could help me with some advice about how to rewrite that for Revo, that would be great!
Thanks!
Daniel
I hope this is the right place to post my concern.
I try to convert the Navigator snippet (http://modxcms.com/extras/package/?package=314) for Revo. I first tried to find all the place where I think I need to replace code. I then started translating the code, for example as follows:
$doc = $this->modx->getPageInfo($id, 0, 'type,published,hidemenu,deleted' );
was translated to
$resource = $this->modx->getObject('modResource', $id);
$doc = $resource->get('type,published,hidemenu,deleted');Is it correct this way?
Now I'm stuck with more complex queries like in the following function:
function GetTVArray()
{
// Gets an array of all template variables
$table = $this->modx->getFullTableName('site_tmplvars');
$tvs = $this->modx->db->select('name', $table);
// TODO: make it so that it only pulls those that apply to the current template
$dbfields = array();
while ( $dbfield = $this->modx->db->getRow( $tvs ) )
{
$dbfields[] = $dbfield['name'];
}
return $dbfields;
}If someone could help me with some advice about how to rewrite that for Revo, that would be great!
Thanks!
Daniel
