Cobalt Records Modules shows all section records (for one or more types).
I'd like to modify your mod_cobalt_records to display only current category records (according to different criteria, just like your actual component).
So I cloned this module to create another one.
I can find easily the current ItemId.
In _js_res_categories, I can find the related category id (params - category_Itemid)
In _js_record, the categories array is stored.
So, I can filter records according to the right category.
But it's not so easy to do.
Modify the template is not enough. Of course, I can filter in the template.
But records are limited to the 'limit' specified in the module .xml file.
So if I set for example this limit to 10, I can only filter the 10 records...
So I have to use the filter before.
In api.php the records are obtained with this command :
$records = JModel::getInstance('Records', 'CobaltModel');
How to use the filter with this command (or at another place).
Thanks for help.
Cobalt Records Modules shows all section records (for one or more types).
I'd like to modify your mod_cobalt_records to display only current category records (according to different criteria, just like your actual component).
So I cloned this module to create another one.
I can find easily the current ItemId.
In _js_res_categories, I can find the related category id (params - category_Itemid)
In _js_record, the categories array is stored.
So, I can filter records according to the right category.
But it's not so easy to do.
Modify the template is not enough. Of course, I can filter in the template.
But records are limited to the 'limit' specified in the module .xml file.
So if I set for example this limit to 10, I can only filter the 10 records...
So I have to use the filter before.
In api.php the records are obtained with this command :
$records = JModel::getInstance('Records', 'CobaltModel');
How to use the filter with this command (or at another place).
Thanks for help.