How to create new template

Author Message

Ahmed Zakaria

Monday 22 August 2011 4:28:56 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

Nicolas Pastorino

Monday 22 August 2011 4:59:09 am

This post is a duplicate, please reply under this one : 

http://share.ez.no/forums/developer/create-new-template

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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 00:03:25
Script start
Timing: Jan 18 2025 00:03:25
Module start 'layout'
Timing: Jan 18 2025 00:03:25
Module start 'content'
Timing: Jan 18 2025 00:03:26
Module end 'content'
Timing: Jan 18 2025 00:03:26
Script end

Main resources:

Total runtime0.7070 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.0061 589.1641152.6406
Module start 'layout' 0.00610.0030 741.804739.4688
Module start 'content' 0.00910.6962 781.2734530.2344
Module end 'content' 0.70540.0016 1,311.507812.1641
Script end 0.7070  1,323.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4952160.0002
Check MTime0.00150.2060160.0001
Mysql Total
Database connection0.00120.167010.0012
Mysqli_queries0.655492.7048540.0121
Looping result0.00050.0718520.0000
Template Total0.676395.720.3382
Template load0.00220.317120.0011
Template processing0.674195.345020.3370
Template load and register function0.00020.024010.0002
states
state_id_array0.00100.138210.0010
state_identifier_array0.00120.164420.0006
Override
Cache load0.00190.2667320.0001
Sytem overhead
Fetch class attribute can translate value0.00060.079220.0003
Fetch class attribute name0.00090.126530.0003
XML
Image XML parsing0.00070.096320.0003
class_abstraction
Instantiating content class attribute0.00000.001130.0000
General
dbfile0.00080.1109160.0000
String conversion0.00000.001640.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs