|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
rayed Smarty n00b
Joined: 24 Jun 2004 Posts: 1
|
Posted: Thu Jun 24, 2004 10:41 am Post subject: Block function similar to {if} {else} {/if} |
|
|
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 |
|
|
|
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
|