Creating a content plugin
An interesting use case of content plugins is using them to include content from other components inside Joomla! articles or even in modules. This gives the administrator of a Joomla! site lots of flexibility and is easy to implement from a developer’s point of view. So, we are going to develop a content plugin that allows the website manager to include these projects in their content.
It’s customary that this kind of plugin uses a shortcode to indicate the project we want to include, so our plugin will use the shortcode {projectlink 42}
to embed a link to the project with ID 42
in a Joomla! article:
- Let’s write our manifest file for this plugin:
<?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="content" method="upgrade"> <name>plg_content_projectlink</name> <author>Carlos...