create new template

Author Message

Ahmed Zakaria

Monday 22 August 2011 4:32:14 am

Hi all

I hope to be fine

I am beginner in ez publish and i need to learn more and more, it is seem powerful and stable CMS

but i am still can not work well with template

i need create new template for the following task (e.g artis.tpl)

 

   Create a new content class called Artist with the following fields.

a.        Artist name (text line).

b.       Biography (text block).

c.       Photo (image).

d.      Is featured (check box).

3-      Under “Home” node in the content structure tree create a new folder called Artists.

4-      Inside the folder you created above, create five artist objects (you can enter any dummy text, lorem ipsum for example), three out of the five artists should be featured artists (by having the checkbox ticked) .

5-      Create a new template named artists.tpl under the proper extension.

1-      Inside artists.tpl, write the required code to loop on the folder artists and display only the name of the featured ones along with their biography and photos.

 

I am aleardy create the class (artist) with its attributes but i can not know to to create the template that achieve that

 

Thanx in advanced

Hamdi Laadhari

Tuesday 23 August 2011 2:42:27 am

read the whole ez documentation http://doc.ez.no/eZ-Publish/Technical-manual/4.x

Certified eZ Publish Entreprise 4.5
http://www.laadhari.fr

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 29 2025 13:32:15
Script start
Timing: Jan 29 2025 13:32:15
Module start 'layout'
Timing: Jan 29 2025 13:32:15
Module start 'content'
Timing: Jan 29 2025 13:32:16
Module end 'content'
Timing: Jan 29 2025 13:32:16
Script end

Main resources:

Total runtime1.0477 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0391151.1953
Module start 'layout' 0.00580.0027 739.234436.6250
Module start 'content' 0.00851.0384 775.8594434.5000
Module end 'content' 1.04700.0007 1,210.35948.1875
Script end 1.0477  1,218.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2861160.0002
Check MTime0.00120.1130160.0001
Mysql Total
Database connection0.00120.115510.0012
Mysqli_queries1.009696.3622540.0187
Looping result0.00030.0327520.0000
Template Total1.015496.920.5077
Template load0.00240.233120.0012
Template processing1.013096.685320.5065
Template load and register function0.00010.013410.0001
states
state_id_array0.00190.182310.0019
state_identifier_array0.00120.111520.0006
Override
Cache load0.00190.1802300.0001
Sytem overhead
Fetch class attribute can translate value0.00050.043920.0002
Fetch class attribute name0.00080.075620.0004
XML
Image XML parsing0.00030.030620.0002
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00060.0604100.0001
String conversion0.00000.000640.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
7content/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: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs