Hi Bob,
Thanks alot for your valuable guides!!!
I’ve learned alot from your posts and website.
I’m a new modx revo adopter, in fact just trying to develop my own site.
Here’s my steps so far:
1. Create a new table in mysql (say: tf_Package and create corresponding xpdo model (using your tutorial on it) -- working well
2. I need to display the tf_Package - one record a time.
2a. Create a snippet with getCollection as in your tutorial, passed the record to placeholders. Create a template which call this snippet with corresponding placeholders -- working well. However, with this dynamic, I’m loosing the google search engine (SEO) compatibility, isn’t it?
2b. Therefore I change the method to create new pages for every records of tf_Package. This time, I’m going to use several TVs. Individually all working well. However, when I try to create several snippets as follow:
//snippet_name: qry_tbl_Trials
$path = MODX_CORE_PATH . 'components/tf_package/';
$result = $modx->addPackage('tf_package',$path . 'model/','tf_');
$trials = $modx->getCollection('Trials', array('trialType'=>$par1, 'trialSubType'=>$par2,));
return $trials;
//snippet_name: createPage
//Count the matching records
[[qry_tbl_Trials?
&par1=`muscle`
&par2=`upper`
]]
//above step not working
//For each record, get the record, create new page, assign record fields to corresponding TVs
//Modify and decorate the template
Would you please help why I cannot call the first snippet from the other?
Anyway, thanks alot for your helpful posts. I’ll search the forum also.