/* Array of elements to export. All elements set below will be handled.
*
* To export resources, be sure to list pagetitles and/or IDs of parents
* of desired resources
*/
'process' => array(
'contexts',
'snippets',
'plugins',
'templateVars',
'templates',
'chunks',
/*'resources',*/
/*'parents',*/
'propertySets',
'systemSettings',
'contextSettings',
'systemEvents',
'menus'
),
$output = ' <?-- Site name option --> <h3>Choose site name</h3> <label for="sitename">Fill in your website name</label> <input type="text" name="sitename" id="sitename" value="" align="left" size="40" maxlength="60" /> <input type="checkbox" name="change_sitename" id="change_sitename" checked="checked" value="1" align="left" /> <label for="change_sitename">Set site name on install</label> <?-- Demo content option --> <h3>Demo content</h3> <label for="sitename">Do you want to install demo content? <strong>WARNING Could overwrite your excisting content!</strong></label> <input type="checkbox" name="add_content" id="add_content" checked="checked" value="1" align="left" /> <label for="add_content">Add demo content on install</label> '; return $output;
This question has been answered by BobRay. See the first response.
$resources = include 'path/to/file' . 'transport.resources.php';
foreach ($resources as $resource) {
$resource->save()'
}
<?php
$root = dirname(dirname(__FILE__)).'/';
$sources = array(
'data' => $root . 'core/components/cosmos/contentResources/',
);
$addContent = $modx->getOption('add_content', $options, false);
if ($addContent) {
$resources = include $sources['data'] . 'transport.resources.php';
foreach ($resources as $resource) {
$modx->log(xPDO::LOG_LEVEL_INFO,'Installing content');
$resource->save();
}
}
$setSiteName = $modx->getOption('change_sitename', $options, false);
if ($setSiteName) {
$siteName = $modx->getOption('sitename', $options);
$modx->log(xPDO::LOG_LEVEL_INFO,'Setting site name to: ' . $siteName);
$setting = $modx->getObject('modSystemSetting','site_name');
$setting->set('value', $siteName);
$setting->save();
}
$root = dirname(dirname(__FILE__)).'/';
$sources = array(
'data' => $root . 'core/components/cosmos/contentResources/',
);
$root = dirname(dirname(__FILE__)).'/';
$sources = array(
'data' => $root . 'core/components/cosmos/contentResources/',
);
$resources = array();
$resources[1] = $modx->newObject('modResource');
$resources[1]->fromArray(array (
'id' => 1,
'type' => 'document',
'contentType' => 'text/html',
'pagetitle' => 'Home',
'longtitle' => '',
'description' => '',
'alias' => 'index',
'link_attributes' => '',
'published' => true,
'isfolder' => false,
'introtext' => '',
'richtext' => true,
'template' => 'Homepage',
'menuindex' => 0,
'searchable' => true,
'cacheable' => true,
'createdby' => 1,
'editedby' => 2,
'deleted' => false,
'deletedon' => 0,
'deletedby' => 0,
'menutitle' => '',
'donthit' => false,
'privateweb' => false,
'privatemgr' => false,
'content_dispo' => 0,
'hidemenu' => false,
'class_key' => 'modDocument',
'context_key' => 'web',
'content_type' => 1,
'hide_children_in_tree' => 0,
'show_in_tree' => 1,
), '', true, true);
$resources[1]->setContent(file_get_contents($sources['data'].'resources/home.content.html'));
$sources = array(
'data' => $modx->getOption('core_path') . 'components/cosmos/contentResources/',
);
Error 23000 executing statement: INSERT INTO `modx_site_content` (`id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`) VALUES (1, 'document', 'text/html', 'Home', '', '', 'index', '', 1, 0, 0, 0, 0, '', '
Content of this page.
', 1, 0, 0, 1, 1, 1, 1418327469, 2, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 'modDocument', 'web', 1, 'index.html', 0, 0, 1, '{\"core\":{\"stercseo\":{\"index\":\"1\",\"follow\":\"1\",\"sitemap\":\"1\",\"priority\":\"1\",\"changefreq\":\"\",\"urls\":null}}}') Array ( [0] => 23000 [1] => 1062 [2] => Duplicate entry '1' for key 'PRIMARY' )
It is trying to create a resource with id=1, but the resource with that id is allready there.
I think there shouldn't be any id defined.
$modx->addPackage('clientconfig', MODX_CORE_PATH . 'components/clientconfig/model/');
$footerSettings = $modx->newObject('cgGroup');
$footerSettings->fromArray(array(
'label' => 'Footer settings',
'sortorder' => '1',
'description' => 'Settings for the footer'
));
$footerSettings->save();
$footer_box_01_title = $modx->newObject('cgSetting');
$footer_box_01_title->fromArray(array(
'key' => 'cosmos.footer_box_01_title',
'label' => 'Footer box 1 title',
'xtype' => 'textfield',
'description' => 'The title above the first footer box.',
'is_required' => '0',
'sortorder' => '1',
'value' => 'Pages',
'group' => $footerSettings->get("id")
));
$footer_box_01_title->save();
Now it would be even better if I would not have to add every setting by hand but if it could be loaded from the database....
<?php
$sources = array(
'data' => $modx->getOption('core_path') . 'components/cosmos/contentResources/',
);
// Check add content setting
$addContent = $modx->getOption('add_content', $options, false);
if ($addContent) {
// Add content
$resources = include $sources['data'] . 'transport.resources.php';
foreach ($resources as $resource) {
$resource->save();
}
// Add ClientConfig settings
$modx->addPackage('clientconfig', MODX_CORE_PATH . 'components/clientconfig/model/');
$analyticsSettings = $modx->getObject('cgGroup', array('label' => 'Google Analytics'));
if (!$analyticsSettings) {
$analyticsSettings = $modx->newObject('cgGroup');
$analyticsSettings->fromArray(array(
'label' => 'Google Analytics',
'sortorder' => '20',
'description' => 'Settings for Google Analytics SEO'
));
$analyticsSettings->save();
}
$analytics_code = $modx->getObject('cgSetting', array('key' => 'cosmos.analytics_code'));
if (!$analytics_code) {
$analytics_code = $modx->newObject('cgSetting');
$analytics_code->fromArray(array(
'key' => 'cosmos.analytics_code',
'label' => 'Analytics code',
'xtype' => 'textfield',
'description' => 'Fill in your tracking code (like: UA-10989210-17)',
'is_required' => '0',
'sortorder' => '1',
'value' => '',
'group' => $analyticsSettings->get("id")
));
$analytics_code->save();
}
}
// Check set site name setting
$setSiteName = $modx->getOption('change_sitename', $options, false);
if ($setSiteName) {
// Set site name
$siteName = $modx->getOption('sitename', $options);
$modx->log(xPDO::LOG_LEVEL_INFO,'Setting site name to: ' . $siteName);
$setting = $modx->getObject('modSystemSetting','site_name');
$setting->set('value', $siteName);
$setting->save();
}
return true;
<?php /** * resources transport file for cosmos extra * * Copyright 2014 by Menno Pietersen [email protected] * Created on 12-14-2014 * * @package cosmos * @subpackage build */ if (! function_exists('stripPhpTags')) { function stripPhpTags($filename) { $o = file_get_contents($filename); $o = str_replace('<' . '?' . 'php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } } /* @var $modx modX */ /* @var $sources array */ /* @var xPDOObject[] $resources */ $resources = array(); $resources[1] = $modx->newObject('modResource'); $resources[1]->fromArray(array ( 'id' => 1, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Home', 'longtitle' => '', 'description' => '', 'alias' => 'index', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => true, 'template' => 'Homepage', 'menuindex' => 0, 'searchable' => true, 'cacheable' => true, 'createdby' => 1, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[1]->setContent(file_get_contents($sources['data'].'resources/home.content.html')); $properties = include $sources['data'].'properties/properties.home.resource.php'; $resources[1]->setProperties($properties); unset($properties); $resources[2] = $modx->newObject('modResource'); $resources[2]->fromArray(array ( 'id' => 2, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'About', 'longtitle' => '', 'description' => '', 'alias' => 'about', 'link_attributes' => '', 'published' => true, 'isfolder' => true, 'introtext' => 'This is some short text about our company.', 'richtext' => true, 'template' => 'General page', 'menuindex' => 2, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[2]->setContent(file_get_contents($sources['data'].'resources/about.content.html')); $properties = include $sources['data'].'properties/properties.about.resource.php'; $resources[2]->setProperties($properties); unset($properties); $resources[3] = $modx->newObject('modResource'); $resources[3]->fromArray(array ( 'id' => 3, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Shortcodes', 'longtitle' => '', 'description' => '', 'alias' => 'shortcodes', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => true, 'template' => 'General page', 'menuindex' => 2, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[3]->setContent(file_get_contents($sources['data'].'resources/shortcodes.content.html')); $properties = include $sources['data'].'properties/properties.shortcodes.resource.php'; $resources[3]->setProperties($properties); unset($properties); $resources[4] = $modx->newObject('modResource'); $resources[4]->fromArray(array ( 'id' => 4, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Contact', 'longtitle' => '', 'description' => '', 'alias' => 'contact', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Want to get in touch? please fill in the form below.', 'richtext' => true, 'template' => 'Contact page', 'menuindex' => 4, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[4]->setContent(file_get_contents($sources['data'].'resources/contact.content.html')); $properties = include $sources['data'].'properties/properties.contact.resource.php'; $resources[4]->setProperties($properties); unset($properties); $resources[5] = $modx->newObject('modResource'); $resources[5]->fromArray(array ( 'id' => 5, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Search results', 'longtitle' => '', 'description' => '', 'alias' => 'search-results', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => true, 'template' => 'Search results', 'menuindex' => 5, 'searchable' => false, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => true, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[5]->setContent(file_get_contents($sources['data'].'resources/search_results.content.html')); $properties = include $sources['data'].'properties/properties.search_results.resource.php'; $resources[5]->setProperties($properties); unset($properties); $resources[6] = $modx->newObject('modResource'); $resources[6]->fromArray(array ( 'id' => 6, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => '404', 'longtitle' => '', 'description' => '', 'alias' => '404', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => true, 'template' => 'General page', 'menuindex' => 6, 'searchable' => false, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => true, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[6]->setContent(file_get_contents($sources['data'].'resources/404.content.html')); $properties = include $sources['data'].'properties/properties.404.resource.php'; $resources[6]->setProperties($properties); unset($properties); $resources[7] = $modx->newObject('modResource'); $resources[7]->fromArray(array ( 'id' => 7, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Not allowed', 'longtitle' => '', 'description' => '', 'alias' => 'not-allowed', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => true, 'template' => 'General page', 'menuindex' => 7, 'searchable' => false, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => true, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[7]->setContent(file_get_contents($sources['data'].'resources/not_allowed.content.html')); $properties = include $sources['data'].'properties/properties.not_allowed.resource.php'; $resources[7]->setProperties($properties); unset($properties); $resources[8] = $modx->newObject('modResource'); $resources[8]->fromArray(array ( 'id' => 8, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Site offline', 'longtitle' => '', 'description' => '', 'alias' => 'site-offline', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => true, 'template' => 'General page', 'menuindex' => 8, 'searchable' => false, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => true, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[8]->setContent(file_get_contents($sources['data'].'resources/site_offline.content.html')); $properties = include $sources['data'].'properties/properties.site_offline.resource.php'; $resources[8]->setProperties($properties); unset($properties); $resources[9] = $modx->newObject('modResource'); $resources[9]->fromArray(array ( 'id' => 9, 'type' => 'document', 'contentType' => 'application/json', 'pagetitle' => 'faq-json', 'longtitle' => '', 'description' => '', 'alias' => 'faq-json', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => false, 'template' => 'json all', 'menuindex' => 9, 'searchable' => false, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => true, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 7, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[9]->setContent(file_get_contents($sources['data'].'resources/faq-json.content.html')); $properties = include $sources['data'].'properties/properties.faq-json.resource.php'; $resources[9]->setProperties($properties); unset($properties); $resources[10] = $modx->newObject('modResource'); $resources[10]->fromArray(array ( 'id' => 10, 'type' => 'document', 'contentType' => 'text/xml', 'pagetitle' => 'Sitemap', 'longtitle' => '', 'description' => '', 'alias' => 'sitemap', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => '', 'richtext' => false, 'template' => 0, 'menuindex' => 11, 'searchable' => false, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => true, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 2, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[10]->setContent(file_get_contents($sources['data'].'resources/sitemap.content.html')); $properties = include $sources['data'].'properties/properties.sitemap.resource.php'; $resources[10]->setProperties($properties); unset($properties); $resources[11] = $modx->newObject('modResource'); $resources[11]->fromArray(array ( 'id' => 11, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Knowledge base', 'longtitle' => '', 'description' => '', 'alias' => 'knowledge-base', 'link_attributes' => 'rel="category"', 'published' => true, 'isfolder' => true, 'introtext' => 'All FAQ\'s are listed below, enter keywords to filer the list.', 'richtext' => true, 'template' => 'Faq', 'menuindex' => 1, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'CollectionContainer', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[11]->setContent(file_get_contents($sources['data'].'resources/knowledge_base.content.html')); $properties = include $sources['data'].'properties/properties.knowledge_base.resource.php'; $resources[11]->setProperties($properties); unset($properties); $resources[12] = $modx->newObject('modResource'); $resources[12]->fromArray(array ( 'id' => 12, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'How do I update your app?', 'longtitle' => '', 'description' => '', 'alias' => 'how-do-i-update-your-app', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'To update our app, just co to settings and click on update.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 0, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[12]->setContent(file_get_contents($sources['data'].'resources/how_do_i_update_your_app_.content.html')); $properties = include $sources['data'].'properties/properties.how_do_i_update_your_app_.resource.php'; $resources[12]->setProperties($properties); unset($properties); $resources[13] = $modx->newObject('modResource'); $resources[13]->fromArray(array ( 'id' => 13, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Where can I find documentation?', 'longtitle' => '', 'description' => '', 'alias' => 'where-can-i-find-documentation', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'The documentation of our app can be found under settings > help.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 1, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[13]->setContent(file_get_contents($sources['data'].'resources/where_can_i_find_documentation_.content.html')); $properties = include $sources['data'].'properties/properties.where_can_i_find_documentation_.resource.php'; $resources[13]->setProperties($properties); unset($properties); $resources[14] = $modx->newObject('modResource'); $resources[14]->fromArray(array ( 'id' => 14, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Is the iPhone 6 supported?', 'longtitle' => '', 'description' => '', 'alias' => 'is-the-iphone-6-supported', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Yes! Our app has full iPhone 6 and iPhone 6 Plus support as well as support for Windows mobile and Anroid.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 2, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[14]->setContent(file_get_contents($sources['data'].'resources/is_the_iphone_6_supported_.content.html')); $properties = include $sources['data'].'properties/properties.is_the_iphone_6_supported_.resource.php'; $resources[14]->setProperties($properties); unset($properties); $resources[15] = $modx->newObject('modResource'); $resources[15]->fromArray(array ( 'id' => 15, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'When will the new version be availabe?', 'longtitle' => '', 'description' => '', 'alias' => 'when-will-the-new-version-be-availabe', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Very soon....', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 3, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[15]->setContent(file_get_contents($sources['data'].'resources/when_will_the_new_version_be_availabe_.content.html')); $properties = include $sources['data'].'properties/properties.when_will_the_new_version_be_availabe_.resource.php'; $resources[15]->setProperties($properties); unset($properties); $resources[16] = $modx->newObject('modResource'); $resources[16]->fromArray(array ( 'id' => 16, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'How do I open the menu?', 'longtitle' => '', 'description' => '', 'alias' => 'how-do-i-open-the-menu', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis consectetur tellus in sagittis. Integer nec lobortis ipsum, ut iaculis arcu. Aenean sollicitudin ex nec mauris scelerisque feugiat ornare a quam. Integer nec feugiat elit.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 4, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[16]->setContent(file_get_contents($sources['data'].'resources/how_do_i_open_the_menu_.content.html')); $properties = include $sources['data'].'properties/properties.how_do_i_open_the_menu_.resource.php'; $resources[16]->setProperties($properties); unset($properties); $resources[17] = $modx->newObject('modResource'); $resources[17]->fromArray(array ( 'id' => 17, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Can I change the app color?', 'longtitle' => '', 'description' => '', 'alias' => 'can-i-change-the-app-color', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis consectetur tellus in sagittis. Integer nec lobortis ipsum, ut iaculis arcu. Aenean sollicitudin ex nec mauris scelerisque feugiat ornare a quam. Integer nec feugiat elit.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 5, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[17]->setContent(file_get_contents($sources['data'].'resources/can_i_change_the_app_color_.content.html')); $properties = include $sources['data'].'properties/properties.can_i_change_the_app_color_.resource.php'; $resources[17]->setProperties($properties); unset($properties); $resources[18] = $modx->newObject('modResource'); $resources[18]->fromArray(array ( 'id' => 18, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'How do I upload images?', 'longtitle' => '', 'description' => '', 'alias' => 'how-do-i-upload-images', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis consectetur tellus in sagittis. Integer nec lobortis ipsum, ut iaculis arcu. Aenean sollicitudin ex nec mauris scelerisque feugiat ornare a quam. Integer nec feugiat elit.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 6, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[18]->setContent(file_get_contents($sources['data'].'resources/how_do_i_upload_images_.content.html')); $properties = include $sources['data'].'properties/properties.how_do_i_upload_images_.resource.php'; $resources[18]->setProperties($properties); unset($properties); $resources[19] = $modx->newObject('modResource'); $resources[19]->fromArray(array ( 'id' => 19, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'When will Blackberry be supported?', 'longtitle' => '', 'description' => '', 'alias' => 'when-will-blackberry-be-supported', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis consectetur tellus in sagittis. Integer nec lobortis ipsum, ut iaculis arcu. Aenean sollicitudin ex nec mauris scelerisque feugiat ornare a quam. Integer nec feugiat elit.', 'richtext' => true, 'template' => 'Awnser', 'menuindex' => 7, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[19]->setContent(file_get_contents($sources['data'].'resources/when_will_blackberry_be_supported_.content.html')); $properties = include $sources['data'].'properties/properties.when_will_blackberry_be_supported_.resource.php'; $resources[19]->setProperties($properties); unset($properties); $resources[20] = $modx->newObject('modResource'); $resources[20]->fromArray(array ( 'id' => 20, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'News', 'longtitle' => '', 'description' => '', 'alias' => 'news', 'link_attributes' => 'rel="category"', 'published' => true, 'isfolder' => true, 'introtext' => '', 'richtext' => true, 'template' => 'News container', 'menuindex' => 3, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'CollectionContainer', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 1, ), '', true, true); $resources[20]->setContent(file_get_contents($sources['data'].'resources/news.content.html')); $properties = include $sources['data'].'properties/properties.news.resource.php'; $resources[20]->setProperties($properties); unset($properties); $resources[21] = $modx->newObject('modResource'); $resources[21]->fromArray(array ( 'id' => 21, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Includes contact form and news section', 'longtitle' => '', 'description' => '', 'alias' => 'includes-contact-form-and-news-section', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'Your Support theme website will include a great contact form with spam check and a powerful news section.', 'richtext' => true, 'template' => 'News article', 'menuindex' => 1, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' => 0, 'menutitle' => '', 'donthit' => false, 'privateweb' => false, 'privatemgr' => false, 'content_dispo' => 0, 'hidemenu' => false, 'class_key' => 'modDocument', 'context_key' => 'web', 'content_type' => 1, 'hide_children_in_tree' => 0, 'show_in_tree' => 0, ), '', true, true); $resources[21]->setContent(file_get_contents($sources['data'].'resources/includes_contact_form_and_news_section.content.html')); $properties = include $sources['data'].'properties/properties.includes_contact_form_and_news_section.resource.php'; $resources[21]->setProperties($properties); unset($properties); $resources[22] = $modx->newObject('modResource'); $resources[22]->fromArray(array ( 'id' => 22, 'type' => 'document', 'contentType' => 'text/html', 'pagetitle' => 'Support Theme is available on ThemesMODX', 'longtitle' => '', 'description' => '', 'alias' => 'support-theme-is-available-on-themesmodx', 'link_attributes' => '', 'published' => true, 'isfolder' => false, 'introtext' => 'The latest version of this theme will be available on ThemesMODX.', 'richtext' => true, 'template' => 'News article', 'menuindex' => 0, 'searchable' => true, 'cacheable' => true, 'createdby' => 2, 'editedby' => 2, 'deleted' => false, 'deletedon' => 0, 'deletedby' =