Cut text without stripping html tags

More
10 years 5 months ago #48082 by leonel.oliveira
Hello,

Would it be possible to implement a function that cuts text without stripping the html tags?

I found that cakephp framework has such a function called "truncate".

It would be great to have both functionalities to strip or not strip tags in blog template category view and also in universal FC module.

book.cakephp.org/2.0/en/core-libraries/helpers/text.html

Found source here:
stackoverflow.com/questions/16583676/sho...r-breaking-html-tags

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #48094 by ggppdk
Hello

hhmm this is tricky to make it work in ALL cases
also our truncate function does a few other steps than just truncate the text



you can duplicate the FLEXIcontent template e.g.
blog -> blog-1

and then modify file(s)
category_items.php
category_items_html5.php

to use the alternative function, and gives us feedback on how it worked


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.422 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline