Currently templates that want to perform ajax queries would need to be installed as a package with an ajax
plugin in order to make calls. This seems like a lot of extra bloat for a template to include.
Instead, could the ajax component be extended to allow support for templates? Perhaps using a similar helper method to the module, like: class TplMyTemplateHelper
?
I don't mind creating a basic concept/pull request.
Direct calls to bypass the root index.php
file are an alternative solution but would be blocked by popular security extensions.
Labels |
Added:
?
|
Category | ⇒ | com_ajax |
So for example templates in the back-end config screen tend to have large amounts of settings these days as they become more like page builders, so loading all data in at once becomes unviable.
My particular template would like to lazy load the data when the user selects the config tab they want rather than wait for the entire form to load.
But does that mean that your templates are becoming too complicated? Do we really want to allow so much interaction with Templates? @brianteeman what are your thoughts?
Since we alreay have support for modules, why not templates as well? They are similar in that they don't have a way to directly call a function from their own code, unlike components.
Status | New | ⇒ | Discussion |
If a template needs to start setting parameters on a per module region basis such as background colours, images, padding, widths, responsive breakpoints etc then the number of parameters can quickly increase.
Also some templates load in a full page builder style interface to allow for complete control over the styling and module region position, so another reason for ajax support.
It may look like they are getting too complicated but with the number of websites builders increasing in popularity on the web, users are requiring more from their Joomla templates.
Labels |
Added:
?
|
Great, waiting for a PR :-)
Done :)
The basic premise is that the front end can only access the current menu item's template (in a similar way to the module behaviour).
The back end is allowed full access, because users are more authorised, and templates can access themselves when in the template manager's edit style config page.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-05 11:56:41 |
Closed_By | ⇒ | zero-24 |
Labels |
Removed:
?
|
In what scenario is a template manipulating data on the fly? :-/