PHP code example of belniakmedia / craft-excerptify

1. Go to this page and download the library: Download belniakmedia/craft-excerptify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

belniakmedia / craft-excerptify example snippets

twig
>{% set fullText = postContent | excerptify(20000000, false, '<a>', true) %}
>{% set excerpt = postContent | excerptify(200, false, '<a>', true) %}
>{% set ending = '.' %}
>{% if fullText|length > excerpt|length %}
>    {% set ending = '...' %}
>{% endif %}
><p>{{ excerpt | raw }}{{ ending }}</p>
>