ExpressionEngine

2.11.9 User Guide

Retired Documentation

You are using the documentation for version 2.11.9. Go here for the latest version or check here for your available upgrades to the latest version.

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
);