Skip to content

Commit

Permalink
Update intro limit
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Sep 6, 2024
1 parent 9ff2e7c commit 2837c4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions framework/elements/articles/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@
$info_margin_before_title = $params->get('info_margin_before_title', '');
$info_margin_after_intro = $params->get('info_margin_after_intro', '');

$enable_intro_text = $params->get('enable_intro_text', 1);
$enable_intro_text = $params->get('enable_intro_text', 1);
$content_font_style = $params->get('content_font_style');
$intro_limit = $params->get('intro_limit', 0);
if (!empty($content_font_style)) {
Style::renderTypography('#'.$element->id.' .astroid-article-introtext', $content_font_style);
}
Expand Down Expand Up @@ -356,7 +357,7 @@
echo '</dl>';
}
if (!empty($item->introtext) && $enable_intro_text) {
echo '<div class="astroid-article-introtext">' . $item->introtext . '</div>';
echo '<div class="astroid-article-introtext">' . mb_substr(strip_tags($item->introtext), 0, $intro_limit, 'UTF-8') . '</div>';
}

if (count($info_after_intro)) {
Expand Down

0 comments on commit 2837c4d

Please sign in to comment.