A list display with relation fields might cause quite some unnecessary code in the web page.
This is caused by using the standard/advanced table for both -- the default table and the table dof the relation field.
A good example is the inline <style>
or the
JHtml::_('dropdown.init');
How to solve this?
1) Using a customized special "relation list template" for it, which does not replicate the code or
2) Optimize the existing (at least advanced table) template for this scenario.
I would prefer 2),
because with option 1) we will always depend on the main list template (like user controls, etc) and might have to spent more time in updating, maintaining the customized templates, while using only one (advanced table) template will make it much easier.
Proposed enhancements:
a) Relation title mode (will only display the title with options for short title) without using table structure - this would also solve the bootstrap table inheritance problem
b) Relation table mode -- this would just remove unnecessary stuff like the <style>
etc since this is provided by the master table template
c) conditional inclusion of custom css field
d) conditional inclusion of JHtml::_('loader.clickover', 'clickoverrel', array());
e) more to follow ...
In my tests with a customized advanced table template with the described features, i was able to reduce the html size of a page from 560KB down to 410KB in removing useless generated code... and this is just the initial version -> more room for improvement
A list display with relation fields might cause quite some unnecessary code in the web page.
This is caused by using the standard/advanced table for both -- the default table and the table dof the relation field.
A good example is the inline
<style>
or theJHtml::_('dropdown.init');
How to solve this?
1) Using a customized special "relation list template" for it, which does not replicate the code or
2) Optimize the existing (at least advanced table) template for this scenario.
I would prefer 2),
because with option 1) we will always depend on the main list template (like user controls, etc) and might have to spent more time in updating, maintaining the customized templates, while using only one (advanced table) template will make it much easier.
Proposed enhancements:
a) Relation title mode (will only display the title with options for short title) without using table structure - this would also solve the bootstrap table inheritance problem
b) Relation table mode -- this would just remove unnecessary stuff like the
<style>
etc since this is provided by the master table templatec) conditional inclusion of custom css field
d) conditional inclusion of JHtml::_('loader.clickover', 'clickoverrel', array());
e) more to follow ...
In my tests with a customized advanced table template with the described features, i was able to reduce the html size of a page from 560KB down to 410KB in removing useless generated code... and this is just the initial version -> more room for improvement