In my custom component, I would like to have multiple slightly different templates for the same view.
Something like
com_things/
...
- views/
- thing/
...
- things/
- tmpl/
tabs.php
accordion.php
default.php
default.xml
view.html.php
In this example, the idea is that default
template, accordion
template and tabs
template all use the data prepared in views/things/view.html.php
, displaying it in slightly different ways.
The data should be displayed in the right template according to the url from which it's accessed, for example index.php?option=com_things&view=things&tmpl=tabs
.
I've been playing with this for a while and looking for documentation, but I'm not being able to implement this feature.
Shouldn't be enough to just create the tabs.php
and accordion.php
file, or am I missing something else?