Skip to the content
Documentation

override_template_list

No ratings yet

Summary

Fetches the override rules associated with a class.

Usage

fetch( 'class', 'override_template_list', hash( 'class_id', class_id ) )

Parameters

Name Type Description Required
class_id integer The ID number of the target class. Yes.

Returns

An array of hashes containing information about the override rules.

Description

This function fetches the override rules that are associated with the class specified by the "class_id" parameter. The function returns an array of hashes. Each element of the returned array contains the following structure:

Attribute Type Description
siteaccess string The siteaccess that the override belongs to.
block string The name of the override block.
source string The path to the original template.
target string The path to the override template.

Examples

Example 1

{def $overrides=fetch( 'class', 'override_template_list', hash( 'class_id', 13 ) )}

{foreach $overrides as $override}

    {$override.target} - ({$override.source}) <br />

{/foreach}

Outputs information about the overrides for class number 13.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.