Question:

Publish page content to both DB & File System

Maria: 2 weeks ago

Is it possible to decide which page be publish to DB and which page be publish to file system case by case in the same publication?

Some of our page's content need to be explored by API, which can be consumed by other applications. But we don't want to push all pages to DB since performance reason.

Answer:
Ryan: 2 weeks ago

In the cd_storage_conf.xml, you can specify an item type to publish to a broker db or filesystem based on the extension.

You would define something like this

<Item typeMapping="Page" itemExtension=".xxx" cached="CACHE_BEHAVIOR" storageId="DB_storage_id" />
<Item typeMapping="Page" itemExtension=".yyy" cached="CACHE_BEHAVIOR" storageId="FS_storage_id" />

Than all you need to do is create a page template with file extension xxx and a page template with file extension yyy, and you're set.

This would enable you to specify where your page would be published to, based on the selected page template.