CollectionConfig
Intro
Every collection has a .configxml file in the appropriate directory in the BX_DATA_DIR directory
There's also the possibility to have a .configxml.children file in that directory. This is then used for all children of that collection (except when there's a .configxml in a child directory)
Example
Here's a rather complex example:
<bxcms xmlns="http:>
<plugins>
<extension type="html"/>
<file name="index"/>
<parameter type="pipeline" name="xslt" value="projects_overview.xsl"/>
<plugin type="structure2xml">
<parameter name="src" value="structure/projects.xml"/>
<parameter name="structure2xml[lang]" value="bx:/>
<parameter name="structure2xml[section]" value="bx:/>
</plugin>
<plugin type="navitree"/>
</plugins>
<plugins>
<extension type="html"/>
<file preg="#.*bild#"/>
<parameter type="pipeline" name="xslt" value="project_gallery.xsl"/>
<plugin type="structure2xml">
<parameter name="src" value="structure/project_single.xml"/>
<parameter name="structure2xml[uri]" value="match:/>
<parameter name="structure2xml[lang]" value="bx:/>
</plugin>
<plugin type="navitree"></plugin>
</plugins>
<plugins>
<extension type="html"/>
<parameter type="pipeline" name="xslt" value="project_single.xsl"/>
<plugin type="structure2xml">
<parameter name="src" value="structure/project_single.xml"/>
<parameter name="structure2xml[uri]" value="bx:/>
<parameter name="structure2xml[lang]" value="bx:/>
</plugin>
<plugin type="navitree"/>
</plugins>
<plugins>
<plugin type="xhtml"/>
</plugins>
<filters>
<extension type="html"/>
<file name="myform"/>
<filter type="formwizard">
</filter>
</filters>
</bxcms>
The first plugins section matches on index.html. The second on everyting with bild in the id. the third one takes every thing else with the extension html. And the last one matches everything else.
There's only one used <plugins> section per request. The first one, which matches is taken.
XML Schema
to be written
plugins
plugins/extension
plugins/file
plugins/parameter
plugins/plugin
plugins/plugin/parameter
filters
Special Schemes
In general, you can use the same schemes as in Popoon. We added 2 new ones, which are not available in Popoon.
bx:// scheme
id
the id of the request (usually the filename without the extension)
lang
the output language
collUri
full uri of the collection
bx://../collUri gives the fulluri of the parent
collUriPart
Uripart of the collection (/news/today/ == today)
bx://../collUriPart is also possible, will give you the collUriPart of the parent
match:// scheme
preg()
value="match://preg('#([^/]+)\/#','
Unknown macro: {bx}
')"/>
will return everything before the first / of the bx://id
Only the first match is returned.
Add Comment