2017 © Pedro Peláez
 

neos-package eel-estimatedreadingtime

EEL Helper to estimate reading time of a document

image

ttree/eel-estimatedreadingtime

EEL Helper to estimate reading time of a document

  • Tuesday, February 13, 2018
  • by ttree
  • Repository
  • 2 Watchers
  • 4 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 56 % Grown

The README.md

EEL Helper to estimate reading time of a document

This package calculate a estimated reading time for the given document., (*1)

Installation

composer require ttree/eel-estimatedreadingtime

Usage

The package provide a service an EEL Helper and a Fusion prototype., (*2)

You can use the EEL Helper, if you have the content string in variable content, like this:, (*3)

${EstimatedReadingTime.get(content)}

The method get accept an addtionnal parmater, the reading speed, expresed in words per minute. By default this value is 200. You can change the value in your Settings.yaml or in the expression:, (*4)

${EstimatedReadingTime.get(content, 240)}

The Fusion prototype use the ContentCollection prototype provided by Neos, to render the content at the given path:, (*5)

prototype(You.Site:ReadingTimeLabel) < prototype(Neos.Fusion:Value)
    readingTime = Ttree.Eel.EstimatedReadingTime:Get {
        nodePath = 'main'
    }
    value = ${'Read the article (' + this.readingTime + ' min.)'}
}

For a correct estimate, the document node must be available in the node context variable., (*6)

Acknowledgments

Development sponsored by ttree ltd - neos solution provider., (*7)

We try our best to craft this package with a lots of love, we are open to sponsoring, support request, ... just contact us., (*8)

License

Licensed under MIT, see LICENSE, (*9)

The Versions

13/02 2018

dev-master

9999999-dev

EEL Helper to estimate reading time of a document

  Sources   Download

MIT

The Requires

 

13/02 2018

1.0.0

1.0.0.0

EEL Helper to estimate reading time of a document

  Sources   Download

MIT

The Requires