ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

object

Summary

Fetches a section.

Usage

fetch( 'section', 'object', hash( 'section_id', section_id, 'identifier', identifier ) )

Parameters

NameTypeDescriptionRequired
section_id integer The ID number of the section that should be fetched. No.
identifier string The identifier of the section that should be fetched. This parameter was added in eZ Publish 4.4. No.

Returns

An ezsection object or FALSE.

Description

This function fetches an object that represents a section. A parameter is required but there should be one and only one parameter in this function. If no parameter is provided or both "section_id" and "identifier" are specified, you will get a FALSE return. The "section_id" parameter must be a valid section ID number. The "identifier" parameter must be a valid section identifier string. The function returns an ezsection object. If an invalid ID number or invalid identifier string is specified, the function will return FALSE.

Examples

Example 1

{def $section=fetch( 'section', 'object', hash( 'section_id', 13 ) )}
{$section.name|wash}

Outputs the name of section number 13.

Example 2

{def  $section=fetch( 'section', 'object', hash( 'identifier',  'standard' ) )}{$section.name|wash}

Outputs the name of section identifier 'standard'.

Balazs Halasy (06/02/2004 12:47 pm)

Geir Arne Waaler (09/08/2010 9:17 am)

Balazs Halasy, Ester Heylen, Geir Arne Waaler


Comments

There are no comments.