craftcms / anchors

Add anchor links to headings in your Craft CMS website content.
MIT License
48 stars 7 forks source link

use filter on plain text #1

Closed danielparas closed 7 years ago

danielparas commented 7 years ago

Hi! Thanks for his plugin. By any chance is there a way to use the filter on plain text? example some similar to this:

<h3>{{testimonialsBlock.heading}}</h3>
{{testimonialsBlock.heading | anchor}}

Thanks Daniel

angrybrad commented 7 years ago

You'd need to do something like this:

{{ ('<h3>' ~ testimonialsBlock.heading ~ '</h3>') | anchors }}