Can't programmatically add page content to page
Permalink
I have built a package that includes the following XML in content.xml. This sets up the page type called "TV Show" in my C5 installation. When I add new pages using the C5 Dashboard, it all works.
However, when I add the page programatically using the Page API, I see a blue box with the following message on the page:
In the Composer view, I see this message:
What am I missing here? Are there extra steps I should take note of when adding new pages programatically?
<?xml version="1.0"?> <concrete5-cif version="1.0"> <pagetypes> <pagetype name="TV Show" handle="tv_show" is-frequently-added="1" package="tv_shows" launch-in-composer="1"> <pagetemplates type="custom" default="right_sidebar"> <pagetemplate handle="right_sidebar"/> </pagetemplates> <composer> <formlayout> <set name="Details"> <control custom-template="" custom-label="Show Title" type="core_page_property" handle="name"/> <control custom-template="" custom-label="URL Slug" type="core_page_property" handle="url_slug"/> <control custom-template="" custom-label="Summary" type="core_page_property" handle="description"/> <control custom-template="" custom-label="Synopsis" output-control-id="6y4mB58T" type="block" handle="content"/> <control custom-template="" type="core_page_property" handle="publish_target"/>
Viewing 15 lines of 44 lines. View entire code block.
However, when I add the page programatically using the Page API, I see a blue box with the following message on the page:
The Synopsis page type composer form element will output its contents here (Block ID 11)
In the Composer view, I see this message:
include(<snipped>/concrete/blocks/core_page_type_composer_control_output/composer.php): failed to open stream: No such file or directory
What am I missing here? Are there extra steps I should take note of when adding new pages programatically?