Forums / Setup & design / Non-repeating text in my line.tpl-override?

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}