Documentation


Tag Reference

Tags are a way to put dynamic content into your theme or page content. They may also be used to as a shorthand way to insert an image tag, link to javascript files, etc. They can be embedded in Page content, Blog posts, and directly in a Theme file.

Some tags accept attributes that affect their output. For example the list of tags that you see on this page is generated by a plugin within the core of PyroCMS. The output is placed in this page by embedding the {pyro:pages:page_tree start-id="foo"} tag.

Under the hood

PyroCMS maps tags like this: {pyro:blog:posts limit="10"} translates to {trigger:class:method attribute="value"}.

The curly bracket and the trigger keyword lets the tags system know that it isn't some random curly bracket in your page content and instead needs to be parsed.

The class segment tells it which file to load. In this case it would be in system/cms/modules/blog/plugin.php but it could also be the plugin.php file in an addon module, in the addons/shared_addons/plugins folder, or if it's a system plugin it will be in system/cms/plugins.

The method segment tells the system which method to run inside the plugin file.

Attributes are parameters that will be passed to that method and in this case it is a database limit to keep from returning all blog posts.