Global Helpers
excerpt()
Signature
Section titled “Signature”excerpt() — returns string
Available in: controller, model, test, migrator, migration, tabledefinition
Category: String Functions
Description
Section titled “Description”Extracts an excerpt from text that matches the first instance of a given phrase.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | yes | — | The text to extract an excerpt from. |
phrase | string | yes | — | The phrase to extract. |
radius | numeric | no | 100 | Number of characters to extract surrounding the phrase. |
excerptString | string | no | ... | String to replace first and / or last characters with. |
Examples
Section titled “Examples”<!--- Will output: ... MVC framework for ... --->
#excerpt(text="CFWheels is a Rails-like MVC framework for Adobe ColdFusion and Lucee", phrase="framework", radius=5)#