Snippets

Prepare Content for Snippets

8 months 3 weeks ago #91000

Toni56's Avatar Toni56

Is there a way to get a "Prepare Content" parameter for Snippets? If it's enabled, content plugins should be triggered for the snippet's text.
Thanks

8 months 3 weeks ago #91001

Peter van Westen's Avatar Peter van Westen Admin

There is no such option in Snippets.

What you could do is place the snippet in an article, then place that article via Articles Anywhere.
Or place it in a module of type Custom (with "Prepare Content" on), and place that module via Modules Anywhere.

8 months 3 weeks ago #91031

Toni56's Avatar Toni56

I used sourcerer to that:
{source}<?php echo JHtml::_('content.prepare', 'mystring'); ?>{/source}

But it's a bit more complicated, so basically this was a feature request 🙂

8 months 3 weeks ago #91032

Peter van Westen's Avatar Peter van Westen Admin

There are no plans to implement this into Snippets itself. But indeed, Sourcerer helps you do this 🙂