Redirect inside a tpl file

Author Message

Glenn MacGregor

Thursday 21 October 2004 10:04:13 am

Hi All,

I have a tpl file in which I look at the value of an object, if the value is something then I want to redirect to an extension (I wrote) if not I want the tpl file to continue.
Is there a way to to send the redirect header or something from the tpl file to get to the correct screen?

Thanks

Glenn

Ɓukasz Serwatka

Thursday 21 October 2004 2:44:56 pm

Maybe this help you

http://ez.no/community/contributions/template_plugins/redirect_operators

With this operators you can redirect your users to another page

{section show=eq($var, value)}
    {redirectrelative( '/path/to/file.php' )}
{section-else}
     your tasks ...
{/section}

I hope this help

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:25:47
Script start
Timing: Jan 31 2025 06:25:47
Module start 'layout'
Timing: Jan 31 2025 06:25:47
Module start 'content'
Timing: Jan 31 2025 06:25:47
Module end 'content'
Timing: Jan 31 2025 06:25:47
Script end

Main resources:

Total runtime0.0134 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.1328151.2109
Module start 'layout' 0.00600.0028 739.343836.6484
Module start 'content' 0.00880.0035 775.992290.2656
Module end 'content' 0.01220.0011 866.257829.9922
Script end 0.0134  896.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002115.2889140.0001
Check MTime0.00096.8624140.0001
Mysql Total
Database connection0.00107.388510.0010
Mysqli_queries0.003022.035830.0010
Looping result0.00000.119110.0000
Template Total0.00096.410.0009
Template load0.00074.912610.0007
Template processing0.00021.430810.0002
Override
Cache load0.00043.176210.0004
General
dbfile0.00021.805880.0000
String conversion0.00000.051540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs