It is 100% not possible for me to create templates that will work with everyone's website. On top of that, Amazon has a great variety of products that don't all come with the same level of detail. Heck, some products have an image and a title - and that's it! We can accommodate for both of these situations using output overrides. It sounds complicated, but for me it was one line of code to give you limitless customization opportunities. So let's start with a brief tutorial on what an output override actually is.
Output Overrides
Joomla has an amazing system to allow a site administrator to modify the OUTPUT of the core without modifying the CODE of the core. The system employs what the core devs have termed "output overrides", and it's simply a way for you to create a copy of the code that generates your page in a specific place, and Joomla will use THAT code instead of the core code when drawing your output.
I understand how it works, so my explanation makes perfect sense to me - but I realize that not everyone has my level of understanding, so let's break it down more simply - using examples directly applicable to THIS plugin.
Detailed Explanation
The plugin is delivered with 3 built-in templates.
- default
- This is a stacked output, image on top of title on top of description on top of button.
- The template is located at:
- JPATH_ROOT/plugins/content/apaapi/tmpl/default.php
- The override path is:
- JPATH_ROOT/templates/YOUR_TEMPLATE/html/plg_content_apaapi/default.php
- horizontal
- This is a row output, image on left - on the right is title on top of description on top of button.
- The template is located at:
- JPATH_ROOT/plugins/content/apaapi/tmpl/horizontal.php
- The override path is:
- JPATH_ROOT/templates/YOUR_TEMPLATE/html/plg_content_apaapi/horizontal.php
- overlay
- This output has the image as the background, with the title at the top of description on top of button.
- The template is located at:
- JPATH_ROOT/plugins/content/apaapi/tmpl/overlay.php
- The override path is:
- JPATH_ROOT/templates/YOUR_TEMPLATE/html/plg_content_apaapi/overlay.php
How Overrides Work
The override paths don't exist on a fresh install. If you create them - Joomla will use the output override instead of the built-in template. So if you're not happy with my default template, you can simply copy it to JPATH_ROOT/templates/YOUR_TEMPLATE/html/plg_content_apaapi/default.php and make any changes you like.
The beauty of this system is that it is safe, and fully sanctioned by the Joomla core devs. You can upgrade Joomla, my plugin - whatever, and these changes will remain intact.