SP Page Builder, Article Element Shows (annoying) Ellipsis At End Of Article - Question | JoomShaper

SP Page Builder, Article Element Shows (annoying) Ellipsis At End Of Article

F

FJN

SP Page Builder 1 week ago

Question about SP Page Builder Article Element. When we insert a Joomla article and show the full text, the rendered result shows ellipsis on a line all by themselves at the end of the full text. How can we get rid of those?

The ellipsis seem to be related to the total character count--text and HTML-- of the Joomla article. In the Page Builder, this is managed under "Show Read More," where we only have the options to Disable, or Enable and specify a char count.

But it seems we have to match the EXACT char count in order to show the full article WITHOUT the ellipsis. But if we're showing the full article (or more than the character count of the article, including HTML), we don't want or neeed the ellipis. They're just distracting and serve no function that we can see. We just want them to go away, please. :)

Should we use a diffrent element type when embedding articles in Page Builder?

Staging site URL in hidden content.

0
7 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 week ago #167334

I have changed from this

if ($show_intro) {
    $output .= '<div class="sppb-article-introtext">' . mb_substr(strip_tags($item->introtext), 0, $intro_limit, 'UTF-8') . '...</div>';
}

to this

if ($show_intro) {
    $output .= '<div class="sppb-article-introtext">' . mb_substr(strip_tags($item->introtext), 0, $intro_limit, 'UTF-8') . '</div>';
}

I have not changed it in the Read More. If you want to remove it from the Read More too, then change this line

if ($show_readmore) {
    $max_title_characters = 25;
    $aria_label = strlen($item->title) > $max_title_characters ?  mb_substr(strip_tags($item->title), 0, $max_title_characters, 'UTF-8') . '...' : strip_tags($item->title);
    $full_aria_label =  Text::_('COM_SPPAGEBUILDER_ADDON_ARTICLES_READ_MORE_ABOUT') . $aria_label;

    $output .= '<a class="sppb-readmore" href="' . $item->link . '" aria-label="' . $full_aria_label . '" itemprop="url">' . $readmore_text . '</a>';
}

to this

if ($show_readmore) {
    $max_title_characters = 25;
    $aria_label = strlen($item->title) > $max_title_characters ?  mb_substr(strip_tags($item->title), 0, $max_title_characters, 'UTF-8') . '' : strip_tags($item->title);
    $full_aria_label =  Text::_('COM_SPPAGEBUILDER_ADDON_ARTICLES_READ_MORE_ABOUT') . $aria_label;

    $output .= '<a class="sppb-readmore" href="' . $item->link . '" aria-label="' . $full_aria_label . '" itemprop="url">' . $readmore_text . '</a>';
}
1
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 week ago #166795

Hello FJN

Please share a screenshot of your issue to understand it better. Take a screenshot and share via any platform. For example: Lightshot or Imgur

Best regards

0
F
FJN
Accepted Answer
1 week ago #166872

Hi Ofi Khan,

Thank you for responding. I have three screenshots for you to review. Let me know if you cannot access these: https://imgur.com/a/gm62GGM

Screenshot #1) Shows the rendered result in the front-end: at the end of the article content there appear the ellipsis. The only way we see to get rid of them is to match EXACTLY the character count of both text and HTML from the Joomla article.

Screenshot #2) Shows the location in SP Page Builder -> Article Element -> Show Intro Text -> Intro text char limit, to set the character count. Too low and the article is truncated; too high and the ellipsis re-appear.

Screenshot #3) Shows you how the ellipsis appear in the HTML via the inspector.

This is happening whenever we use the Article Element, and it's just tedious to figure out the exact char count. Then, if the article is edited, we have to re-calculate the characters. For clients, who are not techies, this is just extra work and confusing. Are we missing some setting somewhere?

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 week ago #166903

Apology for the inconvenience. Please share your administrator access and a page link with the issue here to check it. Use the Hidden Content box to share the credentials. Make sure that you have a full site backup before sharing.

0
F
FJN
Accepted Answer
1 week ago #167045
  • Thank you, Ofi Kahn,

I've created demo content for you to test with:

  • One Joomla article
  • One Page Builder Page
  • One associated menu item
  • A new screeshot of the issue showing in your testing content

All relevant details and your login credentials are in the hidden content. Let me know what you think about how to get rid of those ellipsis at the end of an Article when using the Article Element in Page Builder.

Again, this happens when the Character Count of the article is set higher than the total number of characters in the subject article, including HTML, apparently. Seems unneccessary to have them.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 1 week ago #167128

I have modified this file:

templates/shaper_helixultimate/sppagebuilder/addons/articles/site.php

and removed ... from line 405. It should be okay now.

1
F
FJN
Accepted Answer
1 week ago #167214

Excellent, thank you. A bit of a needle in the haystack.

May I ask how you removed it? I'm asking because this does not seem to be an override fix (or maybe it is and I'm just missing the point), considering future patch updates to SP Page Builder.

In the code you reference, I still see the ellipsis, so that's another reason I'd like to understand what you did to remove them from the rendered front-end page.

if ($show_readmore) {

$max_title_characters = 25;

$aria_label = strlen($item->title) > $max_title_characters ?  mb_substr(strip_tags($item->title), 0, $max_title_characters, 'UTF-8') . '...' :

strip_tags($item->title);
0