"Read more..." link

Author Message

Aya Brea

Sunday 30 November 2003 11:34:35 pm

Hello,

Can you tell me how to show the "Read more..." link to the full view of an article only when the body have some thing. For example, some article contain only an intro part, it needn't to have the "Read more..." link.

Aya Brea

Monday 01 December 2003 12:03:24 am

I found that maybe I can use "is_empty" function to see if body is empty or not. But I dont' know how to use it, I tried "is_empty($node.data_map.body)" but it didn't work, it return true() all the times.

Adolfo Barragán

Monday 01 December 2003 12:18:59 am

I use this sentence and itwork for me:

{section show=$Child:item.object.data_map.body.content.is_empty}
{section-else}
<p class="news_more"><a href={$Child:item.url_alias|ezurl}>Leer m&aacute;s...</a></p>
{/section}
{/section}

Aya Brea

Monday 01 December 2003 1:27:23 am

Thanks, it work for me, btw I suggest you can modify your template to following...

{section show=ne($Child:item.object.data_map.body.content.is_empty, true())}
<p class="news_more"><a href={$Child:item.url_alias|ezurl}>Leer m&aacute;s...</a></p>
{/section}

Adolfo Barragán

Monday 01 December 2003 1:31:46 am

Yes, the modification it's better

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.