Using variable in uri command

Author Message

jonathan howes

Wednesday 30 April 2003 10:07:19 am

I am trying to append a viriable to a uri line based on the section the user is accessing

I was trying to use the following

{include uri ="design:leftmenu{$DesignKeys:used.section}.tpl"}

basically I have 11 section templates and each one is really basic and referenced to other templates with a uri that then calls menu bars etc.

The structure is as follows

template_section calls main_content this then accesses which section you are in and call the apprpriate menus - leftmenu(section) where the section is assign un the uri call.

thanks

joanthan

Paul Borgermans

Wednesday 30 April 2003 10:56:26 am

Try this:

{include uri=concat("design:leftmenu",$DesignKeys:used.section,".tpl")}

First steps with operators and functions are somewhat difficult

Keep learning like we all do.

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

jonathan howes

Wednesday 30 April 2003 11:48:28 am

Worked like a charm - can't beleive I don't catch this one myself - have used the concat in other places.

Thanks for the help

Jonathan

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 01:21:12
Script start
Timing: Jan 31 2025 01:21:12
Module start 'layout'
Timing: Jan 31 2025 01:21:12
Module start 'content'
Timing: Jan 31 2025 01:21:12
Module end 'content'
Timing: Jan 31 2025 01:21:12
Script end

Main resources:

Total runtime0.0300 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.1328151.2109
Module start 'layout' 0.00630.0042 739.3438220.6875
Module start 'content' 0.01050.0177 960.0313997.6953
Module end 'content' 0.02820.0018 1,957.726629.9922
Script end 0.0300  1,987.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003210.6805140.0002
Check MTime0.00124.0315140.0001
Mysql Total
Database connection0.00082.515810.0008
Mysqli_queries0.00268.562630.0009
Looping result0.00000.056410.0000
Template Total0.00134.310.0013
Template load0.00103.254610.0010
Template processing0.00030.986610.0003
Override
Cache load0.00072.209210.0007
General
dbfile0.003411.456680.0004
String conversion0.00000.036540.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