Jump to content

Get record excerpt in custom plugin


Recommended Posts

Hello,

I want to add an excerpt of the record in my custom feed (first 100 letters...). I can't find a variable to achieve this. Can anyone give me some guidance? My current approach

{{if !empty( $records ) }}
{{foreach $records as $record}}
<div class="col-md-6">
  <div class="blog_card">
    <div class="author_info">
      <div class="meta">
        <span>{datetime="$record->mapped('date')"}</span>
      </div>
    </div>
    <h4 class="blog_title">
      {$record->_title}
    </h4>
    <p class="blog_desc">
      {$record->_description} <!-- ???? -->
    </p>
    <a href="{$record->url( "getPrefComment" )}" title='{lang="view_this_cmsrecord" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'content_db_lang_sl_' . $record::$customDatabaseId, FALSE ), $record->_title"}' class="read_more">Read more</a>
  </div>
</div>
{{endforeach}}
{{endif}}

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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