CodeIgniter-Twiggy

Helper Methods

get_twiggy_instance()

Returns the Twiggy instance.

Returns:Instance of this class as object.

twig($name [, $data = NULL, $render = NULL] )

Displays a twig template - alias for the Twiggy render/display method

Parameters:
  • $name (string) - Name of template
  • $data (array) - Data for template
  • $render (bool) - Changes return to render() instead of display()
Returns:If render isn't set, it echo's directly the template, else it return's the template

set_theme($name)

Set the theme for twiggy

Parameters:
  • $name (string) - Name of theme
Returns:void

set_layout($name)

Set the layout for twiggy

Parameters:
  • $name (string) - Name of layout
Returns:void

set_page_title($name)

Set the page title for twiggy

Parameters:
  • $name (string) - Name of page title
Returns:void

append_page_title($name)

Add a title after an already set title

Parameters:
  • $name (string) - Name of page title
Returns:void

prepend_page_title($name)

Add a title before an already set title

Parameters:
  • $name (string) - Name of page title
Returns:void

set_metatag($name, $value [, $attribute = 'name'])

Add a metatag to the meta array

Parameters:
  • $name (string) - Name of metatag
  • $value (string) - Value of metatag
  • $attribute (string) - Attribute of metatag
Returns:void

set_asset($name, $value [, $group = NULL, $extra = array()])

Add a asset to the asset array

Parameters:
  • $name (string) - Name of asset
  • $value (string) - Value of asset
  • $group (string) - Group of asset
  • $extra (string) - Extra options of asset
Returns:void

assets( [$group = NULL] )

Display all assets or only group assets

Parameters:
  • $group (string) - Name of asset group
Returns:Rendered assets as link or script tag

results matching ""

    No results matching ""