truncateHtml not working for Articles Scroller - Forum | JoomShaper
Solved SP Page Builder

truncateHtml not working for Articles Scroller

Asked by Peter Dowse 1 year ago Last activity 1 year ago

Hi Guys,

I've tried adding truncateHtml to the article scroller addon, in particular doing a HTML override and editing line 214

from

            if ($show_intro) {
$output .= '<div class="sppb-articles-carousel-introtext">' . $intro_text . '...</div>';}

to

                if ($show_intro) {
                    $output .= '<div class="sppb-article-introtext">' . $this->truncateHtml($item->introtext, $intro_limit) . '</div>';
                }

But it's throwing a 500 error when I do this.

I've done this multiple times without issue on other addons.

Basically I just want the articles scroller to stop stripping out the HTML tags (Bold, H2 etc) - how do I go about doing this if I can't truncate the introtext?

Accepted answer

Marked as the solution
Paul Frankowski Senior Staff

I am not component developer to help more, and ....

2 more replies

Paul Frankowski Senior Staff
1 year ago · edited

Hi Peter,

Sorry, but all php changes (customizations) are in your hands only. Please contact with the local PHP developer for tip/solution.

Support Policy 8.2. and 8.11.

Peter Dowse Asked this

Ok - let me rephrase the question then.

How do I stop the Joomshaper article scroller addon from stripping out any HTML tags that are in an article?

Log in to reply.