XAO::DO::Web::Content is a dynamic content management for XAO::Web.
< %Content name="about_us"% >
For installation and usage instruction see "INSTALLATION AND USAGE" chapter below.
Content object allows to embed editable content stored in a database into a web page or any other part of a system based on XAO::Web. There are virtually no limitations as to how content can be used.
For instance the text on "News" page of the site might be a Content element. In that case site administrator would not need to modify any templates, but can edit, preview and publish news using web interface only.
Another example could be storing complete product description template as a Content object. In that case modifying all product pages at once would be controlled by modifying just one template over the web in content editor.
A content element is identified by a name that has the same set of restrictions as a XAO::FS ID - up to 30 characters, alpha-numeric and underscore characters only.
Every bit of content has multiple values associated with it arranged by date of their modification. Most current version of content can be in one of two states - published and unpublished. If it is unpublished then it can only be seen if the special preview mode is turned on. That gives an ability to a site administrator to preview changes and probably make corrections before making these changes available for regular site visitors.
A configuration for Content objects can be provided as a part of site configuration. Its URI is '/content' and parameters are:
list_uri => uri of content storage in the XAO FS, defaults
cache_time => for how long to keep retrieved content in memory cache,
default is 5 minutes
cache_size => the size of memory cache in KB, default is 1024
flag_cb_uri => location of a flag in clipboard that indicates whether
or not the preview mode is on