Can someone explain me the template organization ?

Author Message

Alexandre Cunha

Friday 03 January 2003 4:58:48 am

Can someone explain me the template organization of the html templates included on ezP3 beta examples ?
I see 2 dirs: design/standard and design/user.
But no understand where I begin. How setup on ezP3 a new template ? Where is the main template inside this folders ? the specific template for news, the specific template for shop, etc ....

http://AlexandreCunha.com

Alexandre Cunha

Friday 03 January 2003 1:07:37 pm

> First try the dir /design/user/override/templates - there
> you find files beginning with pagelayout_... - these are the
> templates for secctions e.g pagelayout_design_3.tpl is for
> news24 section. Look at all the files in this dir - that's
> all.
> Rafa³ Chmielewski

Ok, i can understand this:

news24 is template pagelayout_section_3.tpl
forum - pagelayout_section_4.tpl
mycompany - pagelayout_section_6.tpl
intranet - pagelayout_section_7.tpl
etc ...

So, where i can associate the content with templates ?
Example, i want use pagelayout_section_4.tpl for section news24. Where i need change ?

axel

http://AlexandreCunha.com

Richard Wood

Friday 03 January 2003 4:17:21 pm

> > Can someone explain me the template organization of the
> html
> > templates included on ezP3 beta examples ?
> > I see 2 dirs: design/standard and design/user.
> > But no understand where I begin. How setup on ezP3 a new
> > template ? Where is the main template inside this folders
> ?
> > the specific template for news, the specific template
> for
> > shop, etc ..
> First try the dir /design/user/override/templates - there
> you find files beginning with pagelayout_... - these are the
> templates for secctions e.g pagelayout_design_3.tpl is for
> news24 section. Look at all the files in this dir - that's
> all.
> Rafa³ Chmielewski

The main user template is:
/design/user/templates/pagelayout.tpl
The idea it seems is to use the override templates for specific sections when they vary from the main one. I simply deleted all the override ones but made a copy of the news one as the main one only as I wanted totally consistent frame look and my site is relatively simple.
You can vary the main content within the frame by changing the files in:
/design/user/override/templates/node/view
full_class_n means a single item view of class n.
line_class_n means a list view of class n.
You set up the classes in the admin section where they are ascribed a number.
As yet no one has answered my question on this forum yet on how to do a simple include file in a tpl file. This would otherwise provide for a consistent look across different override templates if you go down that path. If you or anyone else knows how to do this then please advise.
Richard.

Richard Wood

Friday 03 January 2003 4:19:01 pm

> > Can someone explain me the template organization of the
> html
> > templates included on ezP3 beta examples ?
> > I see 2 dirs: design/standard and design/user.
> > But no understand where I begin. How setup on ezP3 a new
> > template ? Where is the main template inside this folders
> ?
> > the specific template for news, the specific template
> for
> > shop, etc ..
> First try the dir /design/user/override/templates - there
> you find files beginning with pagelayout_... - these are the
> templates for secctions e.g pagelayout_design_3.tpl is for
> news24 section. Look at all the files in this dir - that's
> all.
> Rafa³ Chmielewski

The main user template is:
/design/user/templates/pagelayout.tpl
The idea it seems is to use the override templates for specific sections when they vary from the main one. I simply deleted all the override ones but made a copy of the news one as the main one only as I wanted totally consistent frame look and my site is relatively simple.
You can vary the main content within the frame by changing the files in:
/design/user/override/templates/node/view
full_class_n means a single item view of class n.
line_class_n means a list view of class n.
You set up the classes in the admin section where they are ascribed a number.
As yet no one has answered my question on this forum yet on how to do a simple include file in a tpl file. This would otherwise provide for a consistent look across different override templates if you go down that path. If you or anyone else knows how to do this then please advise.
Richard.

Alexei Pechekhonov

Saturday 04 January 2003 6:45:01 am

> As yet no one has answered my question on this forum yet on
> how to do a simple include file in a tpl file. This would
> otherwise provide for a consistent look across different
> override templates if you go down that path. If you or
> anyone else knows how to do this then please advise.
> Richard.
http://sdk.ez.no/sdk/eztemplate/view/function_include/
and see code at lib/eztemplate/sdk/templates/include.tpl
I hope it's help :)
Cheers...
Alexei

Richard Wood

Saturday 04 January 2003 5:48:33 pm

> > As yet no one has answered my question on this forum yet
> on
> > how to do a simple include file in a tpl file. This
> would
> > otherwise provide for a consistent look across different
> > override templates if you go down that path. If you or
> > anyone else knows how to do this then please advise.
> > Richard.
> http://sdk.ez.no/sdk/eztemplate/view/function_include/
> and see code at lib/eztemplate/sdk/templates/include.tpl
> I hope it's help :)
> Cheers...
> Alexei

Thanks for pointing me to the that directory. I had looked at http://sdk.ez.no/sdk/eztemplate/view/function_include/ but it had no examples so I just figured the documentation was incomplete!
I hadn't clicked that that page was pointing people to look at lib/eztemplate/sdk/templates/include.tpl. There's other template examples in that directory to look at as well.
So for other beginners a simple template include file statement, that allows you to put your header in a common file for your various templates is
{include uri="design/user/templates/pagelayout_section_header.tpl" name="commonheader"} and yes the forward slashes will work on a windows implementation.
Richard

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

Main resources:

Total runtime1.5994 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0154 588.1641152.6563
Module start 'layout' 0.01540.0100 740.820339.5078
Module start 'content' 0.02551.5723 780.3281589.5625
Module end 'content' 1.59780.0016 1,369.890616.1094
Script end 1.5994  1,386.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00690.4295160.0004
Check MTime0.00170.1078160.0001
Mysql Total
Database connection0.00160.098310.0016
Mysqli_queries1.461591.3785680.0215
Looping result0.00090.0579660.0000
Template Total1.488393.120.7442
Template load0.00230.140720.0011
Template processing1.486092.912520.7430
Template load and register function0.00020.009910.0002
states
state_id_array0.00470.295110.0047
state_identifier_array0.00260.161720.0013
Override
Cache load0.00210.13321070.0000
Sytem overhead
Fetch class attribute can translate value0.00120.073230.0004
Fetch class attribute name0.00140.084760.0002
XML
Image XML parsing0.00040.023730.0001
class_abstraction
Instantiating content class attribute0.00000.000860.0000
General
dbfile0.03352.0966100.0034
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs