Redirection function for templates

This module adds a smarty function to redirect the user directly from a template

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is SmartyRedirection.
  • Activate it in your thelia administration panel

Composer

Add it in your main thelia composer.json file

composer require thelia/smarty-redirection-module ~1.0.0

Usage

You can use the {redirect } function like {url }. Only one parameter is specific to this function: status.

If this parameter isn't given, its value is 302. Otherwise, you can set it to 301 to define a permanent redirection in a template.

Example

{if ! $foo}
    {redirect path="/anywhere"}
{/if}
{if ! $foo}
    {redirect path="/anywhere" status=301}
{/if}
Download
Download

Redirection function for templates

This module adds a smarty function to redirect the user directly from a template

Say Hi & Get in Touch

info@thelia.net - +33(0)4 44 05 31 00

Thelia Network English
E-commerce solution

E-commerce software, useful to create and manage online stores, published under a free license. Discover our new version, based on many modern technologies !

Download Thelia
Business

A team of experts at your service.

Showcase

Over 7000 online stores powered by Thelia

Modules

Customize your Thelia.

Openstudio

Thelia editor