How do I make a package check for and update/install sub-packages (like Wayfinder) on install?A.t.m. they are just added to core/packages and need manual install. I would like to keep the sub-packages installed, up-datable and separate.
How do I assign categories to chunks, snippets and TV's on package install?In transport.tvs.php I have the following code:
$templateVariables[1]= $modx->newObject('modTemplateVar');
$templateVariables[1]->fromArray(array(
'id' => 1,
'type' => 'richtext',
'name' => 'footer_box_01',
'caption' => 'Footer-content box 1',
'description' => 'The content of the first footer-content box',
'display' => 'default',
'elements' => '', /* input option values */
'locked' => 0,
'rank' => 2,
'category' => 'Footer content',
'display_params' => '',
'default_text' => '',
'properties' => array(),
),'',true,true);This question has been answered by splittingred. See the first response.
How do I make a package check for and update/install sub-packages (like Wayfinder) on install?https://github.com/splittingred/Articles/blob/develop/_build/resolvers/packages/resolve.getresources.php
How do I assign categories to chunks, snippets and TV's on package install?I think that means having to add it to the Category vehicle. Assigning a name to the "category" field probably wont do much, as that's a relational field expecting an ID.
$success= true;
if ($transport && $transport->xpdo) {
$signature = 'getresources-1.4.0-pl';
$modx =& $transport->xpdo;
$modx->addPackage('modx.transport',$modx->getOption('core_path').'model/');
$success= true;
if ($transport && $transport->xpdo) {
$signature = 'getresources-1.4.0-pl';
$modx =& $transport->xpdo;
$modx->addPackage('modx.transport',$modx->getOption('core_path').'model/');
$signature = 'wayfinder-1.2.0-pl';
$modx =& $transport->xpdo;
$modx->addPackage('modx.transport',$modx->getOption('core_path').'model/');