HOWTO: Add custom Smarty plugins

bsoremsugar —  January 25, 2012 — 2 Comments

We had a great question come up internally here at Sugar last week:

Is it possible to put custom smarty plugins in custom/include/Smarty/plugins/ and have smarty pick them up or do they need to be in include/Smarty/plugins/?

The answer here is yes! This was a new feature added in Sugar 6.3 and came from our Professional Services team, where Smarty will look for available plugins first in the custom/include/Smarty/plugins directory if it exists, and then in include/Smarty/plugins/. This allows you to not only add new Smarty plugins, but also customize theĀ behaviorĀ of the existing ones that ship with Sugar by creating one’s in the custom directory with the same name. Learn more about authoring plugins in the official Smarty documentation.

2 responses to HOWTO: Add custom Smarty plugins

  1. 

    Very good !!!!! Thanks for the share.

  2. 

    Great ! Thank you for sharing. I was wondering about this and found it randomly on google. Thanks again!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s