Custom Template Selection in Admin

Author Message

Oliver Frommel

Tuesday 18 September 2007 7:23:15 am

Hello,

while we have our site running with ezPublish already I still did not complete understand how the template assignment in either the files on the file system (override.ini etc) and the assignment in the admin interface go together.

Is eZ just writing to that same ini files when I change something in the admin interface (I could not make that work most of the time. For instance no new templates got created)? I'd rather not write on the file system if it is possible to avoid it.

The reason I am asking is because we want to implement an admin page for users, similar to the "Design" tab in the regular admin interface. They should be able to choose from several basic designs with according templates. As a basic prototype I'd like to implement an admin page where they can choose from say a one column layout (template a) and a two column layout (template b). How can I implement something like this?

Thanks
Oliver

Betsy Gamrat

Saturday 29 September 2007 6:40:42 pm

Oliver,

Turn on debugging (template debugging, templates used) to see the templates used to deliver the page content.

Identify the template you would like to modify and then navigate to Design > Templates. Enter the name of the template into the Filter box and press enter. The system should find one or more templates. Choose the appropriate template and click on it.

Create an override by selecting the admin siteaccess and then edit it.

That will also update the ini files.

Good luck,

Betsy

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 19 2025 02:41:22
Script start
Timing: Jan 19 2025 02:41:22
Module start 'layout'
Timing: Jan 19 2025 02:41:22
Module start 'content'
Timing: Jan 19 2025 02:41:22
Module end 'content'
Timing: Jan 19 2025 02:41:22
Script end

Main resources:

Total runtime0.0163 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.0061 589.1641152.6250
Module start 'layout' 0.00610.0038 741.789139.4609
Module start 'content' 0.00980.0047 781.250089.3359
Module end 'content' 0.01450.0017 870.585930.3047
Script end 0.0162  900.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.9265140.0002
Check MTime0.00127.1309140.0001
Mysql Total
Database connection0.00095.794810.0009
Mysqli_queries0.003521.304730.0012
Looping result0.00000.142310.0000
Template Total0.00148.710.0014
Template load0.00074.558410.0007
Template processing0.00074.090510.0007
Override
Cache load0.00053.279510.0005
General
dbfile0.00021.416880.0000
String conversion0.00000.063140.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