
We run over 100 classes per year. If a teacher updates their bio, we need to update in dozens of different places on our site. If we update our curriculum, we need to update it in hundreds of places. We use Snippets to make that process much easier. Snippets allows you to enter content in one central location and then re-use it anywhere on your site. Step 1: Download and install
![]() Step 2: Create a snippetTo demonstrate how Snippets works we're going to use the example of a meeting. Imagine that you write a new meeting agenda every month but always add the same meeting details to the end of it. We are going to put those meeting details into a snippet.
![]()
![]() Step 3: Insert the snippet into an articleYou can use Snippets anywhere there's a text area
![]() Step 4: The snippet live on your siteYou can see the text and our inserted snippet. You can re-use the meeting data across your entire site and update everything automatically by going to back to Components, then Snippets and editing the snippet. ![]() Advanced snippets with variablesWe have seen one big advantage of using Snippets, but it allows you to do even more with the use of variables. Let's use the meeting example as before, but this time we'll show you how to use variables. Step 1. Create a snippet with variables
![]() Now we're going to replace the meeting data with variables. Instead of typing in the actual data, put \number. Always start with "\1" you can place the numbers anywhere inside the content window, but keeping them in order of appearance is going to prove very helpful. You need to put the backslash in front of the number. As far as I can tell there isn't a limit to the number you can use, but it's going to get very messy if you have a lot. ![]() Step 2: Create a plain snippetTo make our example work clearly, we're also going to use a regular snippet.
Step 3: Use the snippets
![]()
![]() Step 4: The snippet live on your siteAs you can see below, our list was generated and the variables in the snippet were replaced by the real values. Both the meeting details and the admission policy can now be easily re-used anywhere on your site where there's a text area. That's the power of Snippets. ![]()
|

With Admincredible you can update and manage all your Joomla sites. If you have 5 or 500 sites, Admincredible will make your life easier! Visit Admincredible.com.
All of our tutorials are published under the Creative Commons Attribution-NonCommercial license. This means:
Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.
Copyright 2013 Open Source Training, LLC. All rights reserved.