Non-repeating text in my line.tpl-override?

Author Message

Valentin Svelland

Monday 21 July 2003 3:30:53 am

I've overridden line.tpl by customising a line_services.tpl in my templates folder and adding this to my override.ini.append:

[line_services]
Source=node/view/line.tpl
MatchFile=line_services.tpl
Subdir=templates
Match[class]=15

And of course, this work's out fine. But as many of you know, the content of my line_services.tpl is repeated for every instance of a class in the folder shown.

I need to put a text at the top of the page who doesn't get repeated. Where do I put this? I can't use my line_services.tpl, then my headertext is repeated.. Do I have to rewrite folder.tpl as well? Suggestions is much appreciated!

-------------
By the way, still can't figure out this one: http://ez.no/developer/ez_publish_3/forum/setup_design/how_do_i_not_show_empty_fields_in_custom_class_output

Anyone?
:)

Bjørn Kaarstein

Monday 21 July 2003 4:17:15 am

How about placing this in your pagelayout?

{section show=eq($node.node_id,19)}
Text here
{/section}

(19, being the node containing your services)

For easy positiong, just use a layer around it.
<div id="main-area" style="position:absolute; left:194px; top:319px; width:433px; height:207px; z-index:1; visibility: visible">

Regards Bjørn

Valentin Svelland

Monday 21 July 2003 4:43:22 am

Thanks Bjørn, that works fine. :)

I've got 5 different nodes with services so I guess I'll have to write a {section show} for each of them?

Bjørn Kaarstein

Monday 21 July 2003 5:09:48 am

I think that would do the trick.

-Regards Bjørn

Valentin Svelland

Monday 21 July 2003 6:12:31 am

My final code to solve this, guess this could be done in a more elegant way - but at least it works! ;)

{section show=eq($node.node_id,174)}
<h1>{$node.name} &gt; tjenestebeskrivelser</h1>
{section-else show=eq($node.node_id,172)}
<h1>{$node.name} &gt; tjenestebeskrivelser</h1>
{section-else show=eq($node.node_id,176)}
<h1>{$node.name} &gt; tjenestebeskrivelser</h1>
{section-else show=eq($node.node_id,175)}
<h1>{$node.name} &gt; tjenestebeskrivelser</h1>
{section-else show=eq($node.node_id,177)}
<h1>{$node.name} &gt; tjenestebeskrivelser</h1>
{section-else show=eq($node.node_id,183)}
<h1>{$node.name} &gt; tjenestebeskrivelser</h1>
{/section}

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

Main resources:

Total runtime0.8946 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.0469152.6406
Module start 'layout' 0.00550.0039 740.687539.4766
Module start 'content' 0.00950.8837 780.1641534.5156
Module end 'content' 0.89310.0015 1,314.679712.1250
Script end 0.8946  1,326.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4094160.0002
Check MTime0.00140.1538160.0001
Mysql Total
Database connection0.00110.122910.0011
Mysqli_queries0.834293.2476630.0132
Looping result0.00060.0681610.0000
Template Total0.860596.220.4303
Template load0.00210.235520.0011
Template processing0.858495.951020.4292
Template load and register function0.00010.012210.0001
states
state_id_array0.00210.236510.0021
state_identifier_array0.00260.287220.0013
Override
Cache load0.00180.2044480.0000
Sytem overhead
Fetch class attribute can translate value0.00090.096720.0004
Fetch class attribute name0.00110.128160.0002
XML
Image XML parsing0.00080.088820.0004
class_abstraction
Instantiating content class attribute0.00010.008280.0000
General
dbfile0.00090.0964160.0001
String conversion0.00000.000940.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs