Generating Excerpts of Text

Learn how to generate an excerpt of text with the help of examples.

We'll cover the following

The excerpt helper method

It is used to generate an excerpt from a piece of text based on the first occurrence provided phrase. This method is handy for displaying the results of a user search. The basic structure of the excerpts is shown below:

Get hands-on with 1400+ tech skills courses.