Comments: on this page. Click to read or post your own.

/sapphire/core/SSViewer.php

Description

The SSViewer executes a .ss template file.

The SSViewer class handles rendering of .ss templates. In addition to a full template in the views folder, a template in views/Content or views/Layout will be rendered into $Content and $Layout, respectively.

Compiled templates are cached. If you put ?flush=1 on your URL, it will force the template to be recompiled. This is a hack; the system should really detect when a page needs re-fetching.

Works with the global $_TEMPLATE_MANIFEST which is compiled by ManifestBuilder->getTemplateManifest(). This associative array lists all template filepaths by "identifier", meaning the name of the template without its path or extension.

Example:

  1.  array(
  2.   'LeftAndMain' =>
  3.   array (
  4.      'main' => '/my/system/path/cms/templates/LeftAndMain.ss',
  5.   ),
  6.  'CMSMain_left' =>
  7.    array (
  8.      'Includes' => '/my/system/path/cms/templates/Includes/CMSMain_left.ss',
  9.    ),
  10.  'Page' =>
  11.    array (
  12.      'themes' =>
  13.      array (
  14.        'blackcandy' =>
  15.        array (
  16.          'Layout' => '/my/system/path/themes/blackcandy/templates/Layout/Page.ss',
  17.          'main' => '/my/system/path/themes/blackcandy/templates/Page.ss',
  18.        ),
  19.        'blue' =>
  20.        array (
  21.          'Layout' => '/my/system/path/themes/mysite/templates/Layout/Page.ss',
  22.          'main' => '/my/system/path/themes/mysite/templates/Page.ss',
  23.        ),
  24.      ),
  25.    ),
  26.    // ...
  27.  )

  • todo: Fix the broken caching.
Classes
Class Description
SSViewer The SSViewer executes a .ss template file.
SSViewer_FromString Special SSViewer that will process a template passed as a string, rather than a filename.
Functions
supressOutput (line 532)
void supressOutput ()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:46:25 +1300 by phpDocumentor 1.3.2