template problem solved at last

Author Message

Tore Åbodsvik

Saturday 25 October 2003 7:50:57 pm

I just want to share some information, so i hopefully can help somebody to not waste hours just to find out the same as i did.

System: Ez publish 3.0_2.
Os: Win Xp.

I am setting up a test site, and one of the first thing i did, was to alter the site.ini file.

DefaultAccess="designname"

Then created the folder: \Settings\siteaccess\"designname".
and create the site.ini.append file inside this folder

Went on to create the next folder: \design/"designname"\
and the following folder inside this folder:

Stylesheets -- Css file
Override -- Templates
images -- images used by templates

sub folders inside override is as follows:
Override
-- Templates

I created the pagelayout.tpl file for standard viewing when the user came to the www.designname.com.

Then i logged in ez publisher 3 admin section.
Created 2 folder in the Content area.
1. Home
2. Away

Got in the Set up area. clicked on Sections in the left menu.
And there i created 2 new sections.
1. Home - Id:11
2. Away - Id:12

After that pushed the paper clip so that i could assign the new sections to the folder in Content area.

Eg: Home folder -> section 11
Away folder -> section 12

Then logged out.

Created the following files in the \design\"designname"\Override\Templates

1. pagelayout_section_11.tpl (for the Home folder)
2. pagelayout_section_12.tpl (for the Away folder)

Then everything should be ok?

(Links is now in the pagelayout.tpl set to go to the right folder/section)

I go to the site, click on the Home link, but nothing happens.
I click on the Away link nothing happens other then i get the pagelayout.tpl over and over again.

Tried to adjust every possible thing araoud the system. But nothing helps.

Then after aproximate 8 hours i remove the pagelayout.tpl file.

VOILA. Everything is A OK.

It seems that the pagelayout.tpl takes presedence no matter what.

even if the pagelayout.tpl file lies in the
\design\"designname"\Template folder it takes presedence over pagelayout_section_XX.tpl files.
(As i tried this afterwards)

There is no mentioning of this in any documentation, and i wasted a perfectly good day just finding out this simple thing.

I hope this can help someone, so they dont have to waste their time...

regards Tore

Arash Molavi

Sunday 26 October 2003 8:06:35 am

Actually you can change the content layout by going to:
http://www.yoursite.com/index.php/your_design/setup/templateview/node/view/full.tpl

Tore Åbodsvik

Sunday 26 October 2003 8:22:06 am

But it wasn't the changing of the content that was the problem. It was the way the Ez system handles the tpl files. The pagelayout.tpl i prefered over all the others, no matter what.

Arash Molavi

Tuesday 28 October 2003 5:14:43 am

You do the same as you do with template ovverides in /node/view/full.tpl.

Now you go to:
http://www.yoursite.com/index.php/admin/setup/templateview/pagelayout.tpl and add a new template override. That's it:D

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

Main resources:

Total runtime0.0180 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.0056 587.9141152.6250
Module start 'layout' 0.00560.0041 740.539139.4609
Module start 'content' 0.00970.0059 780.000093.3203
Module end 'content' 0.01570.0023 873.320334.3047
Script end 0.0180  907.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002312.9228140.0002
Check MTime0.00105.6760140.0001
Mysql Total
Database connection0.00094.978610.0009
Mysqli_queries0.003619.820330.0012
Looping result0.00000.139010.0000
Template Total0.001810.210.0018
Template load0.00105.546310.0010
Template processing0.00084.618610.0008
Override
Cache load0.00063.308510.0006
General
dbfile0.00021.368480.0000
String conversion0.00000.049040.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