Jump to content

Recommended Posts

Posted

Hello guys,

I created a new custom block and I need to truncate the record title becasue it's too long. I noticed that for truncating the content it works like that: 

Quote

<section class='ipsType_normal ipsType_richText ipsType_break' data-ipsTruncate data-ipsTruncate-size='3 lines' data-ipsTruncate-type='remove'>
            {$record->truncated()|raw}
</section>

The title tho I have this code {$record->_title} and I don't know whic variant should I use. Anyone can help me? Thanks 🙂 

Posted
3 minutes ago, Matteo Russo said:

 {$record->_title} 

Is that already wrapped with anything in the template? Like a headline or something? It needs some kind of wrapper to work. DIV, H3, P …

<h3 class="ipsTruncate ipsTruncate_line">{$record->_title}</h3>

 

Posted
Quote

<h2 class='record-title ipsType_pageTitle'>
            {{if $record->hidden() === -1 || $record->hidden() === 1}}
                {{if $record->hidden() === -1}}
                    <span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
                {{elseif $record->hidden() === 1}}
                    <span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
                {{endif}}
            {{endif}}
            <a href="{$record->url()}" title="{lang="read_more_about" sprintf="$record->_title"}">
                {{if $record->unread()}}
                    <span class='ipsItemStatus' data-ipsTooltip title="{lang="cms_unread_record"}"><i class="fa fa-circle"></i></span>
                {{endif}}
                {$record->_title}
            </a>
        </h2>

That's the full code. 🙂 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...