Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Block function similar to {if} {else} {/if}

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
rayed
Smarty n00b


Joined: 24 Jun 2004
Posts: 1

PostPosted: Thu Jun 24, 2004 10:41 am    Post subject: Block function similar to {if} {else} {/if} Reply with quote

Hello,

First of all I would like to thank smarty team for this great library, I really love it. Thanks.

I want to build block function to show the first paragraph of a text, and if the text is actually more than one paragraph it will show a link like "(more details)"

It will be used like:

Code:
{first_paragraph}
{$article.text}
{more_paragraph}
<a href="article.php?id={$article.id}">(more details)</a>
{/first_paragraph}


Is it possiple to build such block function?

Thanks in advance.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP