We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Simple Trunchtml issue.

Development and Programming

cmscritic's avatar
cmscritic
10 posts
16 years ago
cmscritic's avatar cmscritic

I am using the following in my template:

{exp:trunchtml chars="200" inline="..." }{exp:html_strip keep="strong,em,a,p"}{simplecontent}{/exp:html_strip}{/exp:trunchtml}

and would like to have it so that the content has three dots (…) immediately after the last word that is truncated as opposed to on a new line.

According to the trunchtml docs, located here: http://utilitees.silenz.org/index.php/docs/item/trunchtml-documentation/ I should end up with a … using the above code.

Can someone assist? Right now it looks like this:

Make your own background pattern for your website!

Have you ever become frustrated searching the web for hours only to find that no matter how many backgrounds or textures you look through, you just can’t find the right one?

Well, here comes a
       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Mike, since this is a third-party plugin, I’ll have to move this to the Plugin forum. That said, since you are nesting plugins, all you might have to do is use

parse="inward"

to the Plugin opening tag. Using that parameter will tell EE to parse that Plugin before parsing any Plugins inside of it.

       
cmscritic's avatar
cmscritic
10 posts
16 years ago
cmscritic's avatar cmscritic

Ah ok.. Sorry about that Ingmar and thanks for the tip.

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

No worries 😊

       
cmscritic's avatar
cmscritic
10 posts
16 years ago
cmscritic's avatar cmscritic

Update.. I tried this:

{exp:trunchtml parse="inward" chars="200" inline="..."}{exp:html_strip keep="strong,em,a,p"}{simplecontent}{/exp:html_strip}{/exp:trunchtml}

but it still does not appear to do anything other than prevent html_strip from functioning correctly.

       
silenz's avatar
silenz
1,648 posts
16 years ago
silenz's avatar silenz

Which version of TrunHTML are you using?

       
cmscritic's avatar
cmscritic
10 posts
16 years ago
cmscritic's avatar cmscritic

Aha.. I downloaded the latest from your site and now it works. I was using the EE repository version

       
silenz's avatar
silenz
1,648 posts
16 years ago
silenz's avatar silenz

I thought so. The one in the repository is quite outdated. It doesn’t even have the inline-parameter.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.