O'Reilly logo

CMS Made Simple Development Cookbook by Samuel Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding registered trademark symbols to a name automatically

As mentioned, one of the few things that a Tag can do that a User-Defined Tag cannot is to act as a Smarty filter. A Smarty filter is called during the process of rendering a template; depending on the type of filter, it can be called before values are substituted into the template (referred to as a "pre-compile filter"), or it can be called after the substitutions are complete (referred to as a "post-compile filter").

Both kinds of filters are extremely powerful for doing global manipulation of the content on your site.

This recipe shows you how to use a Smarty post-compile filter tag to append a symbol after every instance of a given string. Specifically, this filter searches for the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required