'elements' => array(
'chunks' => array(
'flex-4-header' => array(
'category' => 'flex-4',
'description' => 'Header of the flexibility4 template',
'static' => true,
'filename' => 'flex-4-header',
),
'flex-4-footer' => array(
'category' => 'flex-4',
'description' => 'Footer of the flexibility4 template',
'static' => true,
'filename' => 'flex-4-footer',
),
),
'templates' => array(
'Homepage template' => array(
'category' => 'flex-4',
'description' => 'Homepage template of Flexibility 4',
'static' => true,
'filename' => 'flex-4-homepage',
),
),
),
<p>Chunk content goes here</p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>[[++site_name]] - [[*pagetitle]]</title>
<base href="[[++site_url]]"/>
</head>
<body>
[[*content]]
</body>
</html>
$chunks[3]= $modx->newObject('modChunk');
$chunks[3]->fromArray(array(
'id' => 3,
'name' => 'page_gallery',
'description' => 'Gallery chunk',
'snippet' => file_get_contents($sources['data'].'/chunks/page_gallery.tpl'),
'properties' => '',
),'',true,true);'elements' => array(
'chunks' => array(
'flex-4-header' => array(
'category' => 'flex-4',
'description' => 'Header of the flexibility4 template',
'static' => false,
'source' => 1,
'snippet' => file_get_contents('elements/chunks/flex-4-header.html'),
),
'flex-4-footer' => array(
'category' => 'flex-4',
'description' => 'Footer of the flexibility4 template',
'static' => false,
'source' => 1,
'snippet' => file_get_contents('elements/chunks/flex-4-footer.html'),
),
),
'templates' => array(
'Homepage template' => array(
'category' => 'flex-4',
'description' => 'Homepage template of Flexibility 4',
'static' => false,
'source' => 1,
'snippet' => file_get_contents('elements/templates/index.html'),
),
),
),'chunks' => array(
'flex-4-header' => array(
'category' => 'flex-4',
'description' => 'Header of the flexibility4 template',
'static' => false,
'source' => 1,
// 'snippet' => file_get_contents('elements/chunks/flex-4-header.html'),
'filename' => 'flex-4-header.html', // this field is stripped out when the transport file is written
),
),How can I have files in my package (css, js, html) and have the package move them to: "media > assets > components > flexibility4"
if ($hasAssets && $i == 1) {
$helper->sendLog(MODX::LOG_LEVEL_INFO,
$modx->lexicon('mc_packaged_assets_files'));
$vehicle->resolve('file', array(
'source' => $sources['source_assets'],
'target' => "return MODX_ASSETS_PATH . 'components/';",
));
}
if ($hasAssets && $i == 1) {
$helper->sendLog(MODX::LOG_LEVEL_INFO,
$modx->lexicon('mc_packaged_assets_files'));
$vehicle->resolve('file', array(
'source' => $sources['source_assets'],
'target' => "return MODX_BASE_PATH . 'media/assets/components/flexibility4/';",
));
}
'elements' => array(
'chunks' => array(
'flex-4-header' => array(
'category' => 'flexibility4',
'description' => 'Header of the flexibility4 template',
'static' => false,
'source' => 1,
'filename' => 'flex-4-header.html',
),
'flex-4-footer' => array(
'category' => 'flexibility4',
'description' => 'Footer of the flexibility4 template',
'static' => false,
'source' => 1,
'filename' => 'flex-4-footer.html',
),
),
'templates' => array(
'Homepage' => array(
'category' => 'flexibility4',
'description' => 'Template for a homepage',
),
),
),