[Skip to content]  [Text only]  [Accessibility]  [Sitemap]

SF Logo (home page link) phpSiteFramework


Creative Commons License

CC-GNU GPL

[Print]

Content Pre-Processing

Content pre-processing allows 'commands' to be 'embedded' within authored content. Content pre-processing obviously has a little overhead but can be turned on or off on a per directory basis.

It is intended for authors to be able to declare values in content e.g.

<!-- SF_Command:meta_author:Shaun Osborne --> 

which can then be used in headers (e.g. metadata) or footers (e.g. generating 'Author: Shaun Osborne') in some automated way.

Content pre-processing takes place before any screen output has taken place so the values effectively become available to be used 'globally'.

SF places no restrictions on the tag names or tag values so these can be defined as you wish for any given site application. e.g.

<!-- SF_Command:tagname:tag values -->

gets pre-processed into a global array as $SF_commands['tagname']='tag values'

Content pre-processing is currently a 'read-only' operation. It reads and processes 'commands' from the content but has no ability to change the content.

There is no reason why it couldn't be made to do this in the future but it is a design decision at the moment to have it work in this read-only way.



The Fitzwilliam Museum, University of Cambridge.

phpSiteFramework powered