Pb using templates

Author Message

Stéphane Cesbron

Wednesday 17 December 2003 1:34:21 am

Hi,

I'm a newbie to EzPublish. I'm using Ez 3.2-3.
For instance, I'm just trying to complete the tutorial and I'm running into troubles when it comes to use templates in order to display the latest news. It doesn't work.
I've done exactly what it says in the tutorial. I don't understand why it doesn't work properly.

(I've got a desing/tscm/override/templates/full_view_news_folder.tpl based on /node/view/full.tpl)

Can anyone help ?
Any suggestion will be greatly appreciated.
Thanks

Stéphane

Balazs Halasy

Wednesday 17 December 2003 1:52:00 am

Could you please be a bit more specific?
What have you done so far and what is it
that doesn't work? You might have forgotten
to add the template override. Also, remember
to clear the caches.

Balazs

Stéphane Cesbron

Wednesday 17 December 2003 4:52:10 am

Thanks a lot for you reply !

So far I did the following :
Go to the administration interface
Setup > Templates
Locate "/node/view/full.tpl" > Create New > full_view_news_article
Set the "Class" dropdown box to "Article"
Set the "Selection" dropdown box to "News section"
Base template on > Empty file

edit the full_view_news_article.tpl (in /design/tscm/override/templates)

<h1>Latest news</h1>
{* Grab some of the content of the node that is being viewed. *}
{let children=fetch( content, list, hash( parent_node_id, $node.node_id,
sort_by, $node.sort_array,
limit, 7,
class_filter_type, include,
class_filter_array, array(
'article' ) ) )}
{* LOOP: For each child of the node... *}
{section name=Child loop=$children}
{* Display the content of the child using a line-view template. *}
{node_view_gui view=line content_node=$Child:item}
<hr>
{* End of loop. *}
{/section}
{* End of namespace. *}
{/let}

I cleared all caches and tried to review the News page (News section). But it doesn't work, it is still using the default template.

One more question, what is the template override and how can I set it up ?

Regards,
Stephane

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

Main resources:

Total runtime0.5379 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.2188152.6094
Module start 'layout' 0.00550.0029 741.828139.4141
Module start 'content' 0.00840.5281 781.2422512.2109
Module end 'content' 0.53660.0013 1,293.453112.1875
Script end 0.5379  1,305.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.6024160.0002
Check MTime0.00140.2548160.0001
Mysql Total
Database connection0.00100.184910.0010
Mysqli_queries0.487290.5745570.0085
Looping result0.00050.0852550.0000
Template Total0.508494.520.2542
Template load0.00210.391920.0011
Template processing0.506294.104820.2531
Template load and register function0.00010.024010.0001
states
state_id_array0.00130.239510.0013
state_identifier_array0.00080.147820.0004
Override
Cache load0.00180.3382510.0000
Sytem overhead
Fetch class attribute can translate value0.00060.107820.0003
Fetch class attribute name0.00080.151040.0002
XML
Image XML parsing0.00050.095920.0003
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00070.1384160.0000
String conversion0.00000.001740.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs