Templates with AvTemplate Helper

Site Avenger makes extensive use of the AvTemplate helper, in views, elements and templates (located in the layouts folder).

Beginning a Template

To start a template, you will use the AvTemplate->open() function.  This function is based on the normal and often used parameters to make for as little setup as possible.

  1. echo $avtemplate->open();

There are many parameters you can pass to dictate how the title tag, meta tags and asset links are displayed.  The open() function is an aggregator function that in turn calls several self-contained and independent functions.  If you have a highly-custom template, you may want to use the AvTemplate functions as stand alone.

Basic Avtemplate->open() Usage

  1. $openOptions =
  2.     array(
  3.         'css' =>
  4.         array(
  5.             'screen' => array('base', 'typography', 'forms', 'layout', 'nav', 'color', 'widgets'),
  6.             'print' => array('base', 'typography', 'print'),
  7.         ),     
  8.     );
  9.     echo $avtemplate->open($openOptions);

Avtemplate->open() Options

 

1-207-221-3255 | Contact Site Avenger - Your Content Management Superhero

Copyright © 2019 Saco Design, Inc. | All Rights Reserved | Website Design by Saco Design | Superpowered by Site Avenger