[SOLVED] Smarty Truncate Problem
Posted: Sun Jul 08, 2012 10:53 pm
So this is a strange one...
I have a news summary that looks like this:
My <p> tags are inside the article, which outputs:
Problem is, as you can see the trailing </p> is truncated too, meaning that the page doesn't validate! And I potentially will have display issues too.
Anybody have an idea how to make it NOT truncate the trailing </p> tag? I've looked everywhere!
Thanks in advance.
I have a news summary that looks like this:
Code: Select all
{if $entry->content}
<div class="newstext">
{eval var=$entry->content|truncate:100}
<p><a class="readmore" href="{$entry->moreurl}">read more →</a></p>
</div>
{/if}
Code: Select all
<div class="newstext">
<p>As part of our commitment to ensure you reach your personal Health Goals, (company name) have...
<p><a class="readmore" href="#thelink">read more →</a></p>
</div>
Anybody have an idea how to make it NOT truncate the trailing </p> tag? I've looked everywhere!
Thanks in advance.