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.