How can I change a site template on-the-fly?

Author Message

Paco Avila

Friday 26 September 2003 8:00:38 am

I want to put a link name "Accesibility" and must show an other site version with a more basic design. This value should be "remembered" in the actual user session. But I don't know how can change a site template on-the-fly nor put this value in the session.

Thanks in advance.

Arash Molavi

Friday 26 September 2003 8:28:30 am

You should probebly do it "on the fly", it'll make it somewhat more simple for you:D

Paul Borgermans

Friday 26 September 2003 11:22:52 am

Same way you would do for eg a print-layout.

Create a new pagelayout mode (and define it in layout.ini.append in either override or a specific siteaccces).

Then use /layout/set/<mynewlayout>/<rest of current url>

<rest of current url> can be nice urls too

All your links will have this additional part prepended.

Proof: go to the doc index on ez.no, select the "printer version" link and browse. If you have acrobat(full version), you can easily create your own set of pdf docs typing in the print url, although it will not be that friendly (but cross links work). After you have done such things with acrobat, send a new pair of CPU's to ez.no ;-)

-paul

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

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 03:43:13
Script start
Timing: Jan 31 2025 03:43:13
Module start 'layout'
Timing: Jan 31 2025 03:43:13
Module start 'content'
Timing: Jan 31 2025 03:43:13
Module end 'content'
Timing: Jan 31 2025 03:43:13
Script end

Main resources:

Total runtime0.0238 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.2656151.2266
Module start 'layout' 0.00540.0032 739.4922220.7188
Module start 'content' 0.00860.0139 960.2109997.7422
Module end 'content' 0.02250.0012 1,957.953133.9922
Script end 0.0237  1,991.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002510.4666140.0002
Check MTime0.00114.4357140.0001
Mysql Total
Database connection0.00093.825710.0009
Mysqli_queries0.002610.755630.0009
Looping result0.00000.042110.0000
Template Total0.00093.810.0009
Template load0.00073.072210.0007
Template processing0.00020.669210.0002
Override
Cache load0.00052.251510.0005
General
dbfile0.00166.805580.0002
String conversion0.00000.027140.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