OctoberCMS is one of the rising stars in content management systems, and as in every CMS we need plugins to extend the functionality. In this article, we’re going to go through the basics of creating a plugin for October CMS.
What we’re building
Almost all websites need Google Analytics. We’re going to make a plugin that inserts the Google Analytics tracking code into the page using a component tag.
After inserting your tracking id in the settings form, you’ll need to insert the component tag on the pages that you want to track, or inside a partial.
{% component 'gaCode' %}
You can see the final result on github and try it out.
Managing Plugins
October has a plugins
folder inside the root directory, where you can find, install, remove and develop plugins.
To manage your plugins, you can click the System > updates
link. We have two different ways to manage our plugins.
Continue reading %Building OctoberCMS Plugins: Google Analytics%
by Younes Rafie via SitePoint
No comments:
Post a Comment