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

SF Logo (home page link) phpSiteFramework

Creative Commons License



Directory Configuration

SF can be configured on a per directory basis. The following parameters may be configured per directory:

  • menu data file
  • menu set to use
  • menu subset to open
  • CSS file to use in additional to the default phpSiteFramework CSS
  • header file to use
  • footer file to use
  • whether to do content pre-processing in this directory

SF also 'falls back' for all settings to the last defined level; the effect of this is that a setting is never not defined. SF provides 'defaults' out-of the box, so if SF is configured incorrectly it will 'fall-back' to the defaults as a last resort
e.g. if config contains settings for

/ - settings for root....
/test/ - settings...
/test/test/ - settings...

and you access:

  • /about/index.html - SF will fall-back to /
    (there is no match for /about/)
  • /test/test/projects/index.html - SF will fallback to settings for /test/test/
    (there is no match for /test/test/project/ but there is for /test/test/)
  • /test/projects/code/index.html - SF will fallback to settings for /test/
    (there is no match for /test/projects/code/, nor for /test/projects/ but there is for /test/)

Taking this a step further SF does this ('fall-back') for each setting independently (menu, css, header etc) so is extremely configurable but also very easy to allow this inheritance to take care of a lot of settings.
for example if you config settings for

/testsite/projects/  - settings.....

any directory you create under this structure (e.g /test/projects/project1/, /test/projects/project2/documentation/chapter1/) will inherit settings from /test/projects/ if no more specific ones are defined

The Fitzwilliam Museum, University of Cambridge.

phpSiteFramework powered