Chapter 11. Creating Snippets
So far, we have learned how to use snippets to get the required functionality for our site. What about when there are no snippets available to do what we want to do? We might have to create the snippet ourselves. Fortunately, unlike most other CMSs, MODx requires no—or very little—overhead to turn any regular PHP code into a snippet.
Note
This chapter requires you to have a basic knowledge of PHP. However, even if this is not the case, I recommend that you read this chapter, as it will help you to better understand snippets.