Hello KK
I am a fan of CouchCMS and use it extensively building a full featured ajax app based on CouchCMS.
For building table lists I often have to improve performance. Therefore I do things like:
Reason is that the template company.php has dozens of custom fields. But this solution above gets very uncomfortable if I need more than one or two custom fields.
Here my suggestion:
What about an additional parameter in the pages, related_pages, reverse_related_pages tags e.g.
This would reduce the amount of variable associations to a minimum but reducing coding effort while using the stuff above.
It would be something in-between the params skip_custom_fields='1' and no params converning custom_fields.
I am a fan of CouchCMS and use it extensively building a full featured ajax app based on CouchCMS.
For building table lists I often have to improve performance. Therefore I do things like:
- Code: Select all
<cms:set company_ids="<cms:pages masterpage='company.php' ids_only='1' /> " /> <cms:each company_ids> <cms:set company_name="<cms:get_custom_field 'company_name' masterpage='company.php' id=item />" /> <tr><td><cms:show company_name /></td></tr> </cms:each>
Reason is that the template company.php has dozens of custom fields. But this solution above gets very uncomfortable if I need more than one or two custom fields.
Here my suggestion:
What about an additional parameter in the pages, related_pages, reverse_related_pages tags e.g.
- Code: Select all
<cms:pages masterpage='template.php' include_custom_fields='custom_field_one, another_custom_field, ...' /> Access only to the specified custom fields above and to k_page_name, k_page_id, ... </cms:pages>
This would reduce the amount of variable associations to a minimum but reducing coding effort while using the stuff above.
It would be something in-between the params skip_custom_fields='1' and no params converning custom_fields.