Download EE 2 Docs Download EE 1 Docs
ExpressionEngine

2.6.1 User Guide

Core Library Extension Hooks

core_template_route

core_template_route($uri_string)

Reassign the template group and template loaded for parsing.

How it’s called:

$edata = ee()->extensions->call('core_template_route', ee()->uri->uri_string);
if (is_array($edata) && count($edata) == 2)
{
    list($template_group, $template) = $edata;
}
Parameters:
  • $uri_string (string) – Current URI string
Returns:

Array containing the name of the template group and template (see below)

Return type:

Array

Example of array to return:

array(
    'template_group', // Template group name
    'template'        // Template name
);

User Contributed Notes

You must either have an EllisLab product license and have attained a forum rank of "Lab Assistant" (50 posts) to contribute notes to the User Guide