The demo content package cjw_multisite_democontent
cjw_multisite_democontent holds the content of the CJW starter site. It is a package of type contentobject with
install_type="install", required by cjw_multisite. Next to what the kernel's package handlers install
(classes and objects), it carries four side files that only the site package's installer reads. This page explains
each part, for developers who change the content or build a package like it.
Contents
- The package in short
- The content classes
- The content objects
- Simple files that point into the extension
- cjw-class-additions.xml
- cjw-starter-import.json
- cjw-explayouts.json
- cjw-paths.json
- Related pages
The package in short
From package.xml:
The content of the CJW Multisite starter site (design starter of the cjw_themes_jumper extension): pages,
articles, news, galleries, banners, forms and images, in English and German, with the content classes it uses.
The image and file contents are read from extension/cjw_themes_jumper/share/content-images and content-files.| Part | Count | Installed by |
|---|---|---|
<provide type="ezcontentclass"> entries and ezcontentclass install items | 40 | the kernel's content class handler |
Object files listed in ezcontentobject/contentobjects.xml | 138 | the kernel's content object handler |
<simple-file> entries | 158 | the kernel, after the installer linked them in |
| Side files | 4 | the site package's installer (cjw-starter-install.php) |
Every reference between objects, nodes, tags and layouts uses remote ids, never ids of another installation:
objects are cjw-starter-o-<id>, nodes cjw-starter-n-<id>, tags cjw-starter-t-<id>. The starter root is
cjw-starter-n-root (an object named "Starter", placed below the content root), the start page
cjw-starter-n-779.
The content classes
The 40 classes, all with an ezcontentclass install item:
| Group | Classes |
|---|---|
ng_* pages and parts (31) | ng_accordion_item, ng_article, ng_audio, ng_banner, ng_blog_post, ng_category, ng_component_about, ng_component_features, ng_component_hero, ng_component_lead, ng_component_logos, ng_component_quote, ng_contact_form, ng_container, ng_cookie_policy, ng_frontpage, ng_gallery, ng_htmlbox, ng_job_application_form, ng_job_position, ng_landing_page, ng_lead_form, ng_logo, ng_menu_item, ng_news, ng_person, ng_recipe, ng_shortcut, ng_site_info, ng_topic, ng_video |
| Forms and folders (3) | cjw_feedback_form, cjw_folder_management, ng_feedback_form |
| The TMV event feed (6) | tmv_container, tmv_container_categories, tmv_categorie, tmv_date, tmv_event, tmv_image |
The classes image and file that 63 of the objects use come from the required sevenx_classes.
The content objects
contentobjects.xml lists the 138 object files in install order, names one top node (cjw-starter-n-root, "Starter")
and the siteaccesses site and admin. cjw-starter-import.json lists 137 of the objects with class, languages and
node remote id; by class:
| Class | Objects | Class | Objects |
|---|---|---|---|
image | 61 | ng_article | 23 |
ng_news | 9 | ng_banner | 6 |
ng_container, ng_gallery, ng_landing_page, ng_shortcut | 5 each | file, ng_category, ng_htmlbox | 2 each |
cjw_feedback_form, cjw_folder_management, ng_audio, ng_blog_post, ng_cookie_policy, ng_feedback_form, ng_frontpage, ng_recipe, ng_site_info, ng_video, tmv_container, tmv_container_categories | 1 each |
Languages: 111 objects are in ger-DE only, 22 in eng-US only and 4 in both. Each object file keeps its original
publish and modify times (ezremote:published, ezremote:modified), which the installer restores so lists sorted by
date come out as on the source site.
Simple files that point into the extension
A <simple-file> entry of this package has, besides the usual key, original-path and package-path, an
extension-path attribute:
<simple-file key="..." original-path="var/site/storage/images/..."
package-path="simplefiles/2559185f95d63921.jpg"
extension-path="extension/cjw_themes_jumper/share/content-images/2559185f95d63921.jpg"/>The archive has no simplefiles/ folder. Before the packages are installed, cjwLinkStarterFilesFromExtension()
creates a symbolic link in the package's simplefiles/ for every entry (a copy where links cannot be made), so the
kernel finds each file where eZPackage::simpleFilePath() expects it. After the install,
cjwUnlinkStarterFilesFromExtension() removes those links again (copies stay). 155 entries point into
share/content-images/, 3 into share/content-files/, 77 distinct files in all.
cjw-class-additions.xml
Eighteen attributes in nine classes that the starter content needs on top of the ng_* classes of sevenx_classes:
| Class | Attributes (datatype) |
|---|---|
ng_article | additional_image, icon_title (ezimage) |
ng_banner | header_text (ezxmltext) |
ng_category | image (ezimage) |
ng_container | full_intro, teaser_intro (ezxmltext), image (ezimage), short_title (ezstring) |
ng_frontpage | teaser_title (ezstring), teaser_intro, full_intro (ezxmltext), image (ezimage), tags (eztags) |
ng_gallery | column_count (ezinteger) |
ng_landing_page | full_intro (ezxmltext), image (ezimage) |
ng_news | location (ezgmaplocation) |
ng_shortcut | icon_title (ezimage) |
cjwEnsureStarterClassAdditions() adds an attribute only when the class has none of that identifier: never
required, after the last attribute, with an empty value in every existing object. The class definitions of this
package carry them already, so on a new installation all are reported as present; an installation whose classes came
from elsewhere gets what is missing. An existing attribute is never changed; one with another datatype is reported.
cjw-starter-import.json
The import sidecar. Its keys:
| Key | Content | Used by |
|---|---|---|
source | The site and time of the snapshot the content was taken from | information only |
root_node_remote_id, home_node_remote_id | cjw-starter-n-root, cjw-starter-n-779 | information; the installer has them as constants |
hidden_node_remote_ids | cjw-starter-n-807, the configuration folder (site info, cookie policy, header links) | cjwHideStarterNodes() |
tags | 5 tags with parent, keyword, remote id and locale | cjwFixStarterTags() |
link_resolution | How ngenhancedlink values with a remote_id get the installed object's id | cjwResolveStarterLinks() |
objects | 137 objects with remote id, class, languages, node remote id and MD5 | checks |
files | 158 simple-file keys with extension-path and SHA-1 | checks |
The tags are made below a tag "Starter" (cjw-starter-t-root); the tag ids in the object files are those of the
source site and are not used.
cjw-explayouts.json
The layouts of the starter, as rows for the explayouts tables:
{ "band": 900000, "node_references": { ... }, "rows": { "explayouts_layout": [ ... ], ... } }| Table | Rows | Table | Rows |
|---|---|---|---|
explayouts_layout | 23 (6 shared) | explayouts_collection | 59 |
explayouts_zone | 113 | explayouts_collection_item | 5 |
explayouts_block | 269 | explayouts_collection_query | 42 |
explayouts_block_parameter | 2,043 | explayouts_rule | 11 |
explayouts_rule_target | 11 (7 subtree, 4 node) | explayouts_rule_condition | 19 (11 siteaccess, 8 class) |
All ids are 900000 or higher (the band). node_references names, per row of explayouts_collection_item,
explayouts_collection_query and explayouts_rule_target, the field that holds a node id and the node's remote id.
cjwSeedStarterLayouts() replaces those with the node ids of the new installation, sets every siteaccess condition to
the installation's user siteaccesses, deletes the rows of the band that exist, inserts the file's rows and clears the
layout resolver cache. Nothing below the band is touched.
Note
Unlike sevenx_multisite, whose layout rows come from the share/*.dba files of extensions, the starter's layouts
travel inside the content package. See sevenx_multisite and cjw_multisite compared.
cjw-paths.json
The URL path of every node on the source site, per language view: 138 entries, 137 keyed by node remote id and _root
for the starter root itself. An entry:
"cjw-starter-n-176": { "node": 176, "class": "ng_landing_page", "languages": ["eng-US","ger-DE"],
"hidden": 0, "ger": "showcase", "name_ger": "Showcase", "eng": "showcase", "name_eng": "Showcase" }cjwApplyStarterPaths() walks the tree top-down and makes each node's last path segment the wanted one, so the
installed site answers the same addresses as the source site. See The installer scripts.
Related pages
- cjw_multisite
- What cjw_multisite is made of
- The installer scripts
- The CJW Themes Jumper extension
- Install items and handlers
- The demo content packages of sevenx_multisite
- Site packages: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.