User Tools

Site Tools


bigace:developer:viewhelper:content

content()

Returns the named content for the current or given item.

→ Since BIGACE 3.0

Further infos at the ViewHelper content() PHPDoc.

Attributes

  • $name - (optional, string)

The name of the content, as described in Zend_Layout (meta information). If not given, the default content is used.

  • $item - (optional, Item)

The item to fetch the content for. If not given, the current page is used.

Example 1

This example shows how to output the default content of the current page.

<?php
 
  $foo = $this->content();
 
?>

Example 2

This example shows how to output the content 'contact' of the current page.

The Layout definiton:

<?php
/*
Description: An example layout
Contents: contact
*/
?>
<?php
 
  $foo = $this->content('contact');
 
?>
bigace/developer/viewhelper/content.txt · Last modified: 2010/08/05 14:19 by bigace