diable read more... when body is empty

Author Message

Menno van Drunen

Friday 19 September 2003 10:44:41 am

I would like to disable the read more link under a intro text when the body is emty, how should i do this. (probably the answer is easy but i can not find it...)

Bjørn Kaarstein

Monday 22 September 2003 1:58:07 am

Try to use something like
{section show=ne($node.data_map.body.content.output.output_text, 0)}

<a href..... >read more...</a>

{/section}

Regards Bjørn

Thomas Brandl

Tuesday 23 September 2003 4:37:28 am

I need that too, having two problems:
1. I had no luck finding the length of a xml-field
2. {section show=ne($node.data_map.text.content,0)} doesn't work for me? You need a count?!

This worked for me:
{section show=ne($node.data_map.text.content|count_chars,0)}

cheers
t

Marco Zinn

Monday 03 November 2003 1:15:03 pm

Hi,
which version are you using?
There is a function or operator called "is_empty". I used that for the section show condition and it worked nicely.

Marco
http://www.hyperroad-design.com

Nils Sanders

Sunday 18 January 2004 9:05:16 am

I have the same problem but nothing posted here help me. The "read more" is still there )-:

I work with ezp 3.3-2 and tryed to fix the problem in the /node/view/line.tpl - is this wrong?

PLEASE HELP!

Anders F

Sunday 18 January 2004 12:04:47 pm

It's already in the forum:

http://www.ez.no/developer/ez_publish_3/forum/setup_design/read_more_link

It worked for me.

Nils Sanders

Sunday 18 January 2004 12:36:00 pm

Wow! Thank you Anders F. Now it works. I always put the code in the wrong template - grrr...

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 31 2025 00:30:09
Script start
Timing: Jan 31 2025 00:30:09
Module start 'layout'
Timing: Jan 31 2025 00:30:09
Module start 'content'
Timing: Jan 31 2025 00:30:09
Module end 'content'
Timing: Jan 31 2025 00:30:09
Script end

Main resources:

Total runtime0.0255 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.2500151.2266
Module start 'layout' 0.00720.0043 739.4766220.7031
Module start 'content' 0.01140.0126 960.17971,001.7891
Module end 'content' 0.02400.0015 1,961.968833.9922
Script end 0.0255  1,995.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002710.6859140.0002
Check MTime0.00114.3651140.0001
Mysql Total
Database connection0.00083.177210.0008
Mysqli_queries0.004718.625730.0016
Looping result0.00000.054210.0000
Template Total0.00114.110.0011
Template load0.00083.252110.0008
Template processing0.00020.874510.0002
Override
Cache load0.00062.286810.0006
General
dbfile0.00114.366980.0001
String conversion0.00000.027140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs