I am thinking about how we can more consistently render out different content interfaces uniformly through the main_multi_content block, so that we can significantly cut down on the number of blocks we have while allowing anything to display in any way. We can do that through adding some new render_* methods to the CMA hooks.
render_box($row)
render_tile($row)
get_hyperlink_details($row)
get_thumbnail_details($row) // Used for grid, mosaic, slider, carousel
render_columned_table($rows)
Once we have main_multi_content being able to render out different content interfaces, we can then look to see if a lot of the current catalogue and gallery code can be removed and main_multi_content used instead.
There may be other parts of Composr that can be vastly simplified to use the new hook functionality, e.g. the newsletter what's new hooks.
Also generally we should review what is using the CMA hooks and see if their use can be better abstracted to functionality from the CMA hook base class or functions in content.php. I don't like that lots of different parts of Composr right now are likely accessing CMA metadata manually and doing weird stuff - it should be more centralised.
Anything that relies on getting images or titles via metadata in CMA hooks should ideally be able to do so even if it requires querying the content row first (e.g. for catalogues). I think right now there are some cases where titles and images just won't be supported for particular content types.
This is now implemented, although the fine details have diverged a bit. I didn't implement get_parent_row_and_cma_ob/get_meta_description/get_meta_keywords because there was no need, and we want to minimise our code weight overhead given this is very core functionality.
render_box($row)
render_tile($row)
get_hyperlink_details($row)
get_thumbnail_details($row) // Used for grid, mosaic, slider, carousel
render_columned_table($rows)
Once we have main_multi_content being able to render out different content interfaces, we can then look to see if a lot of the current catalogue and gallery code can be removed and main_multi_content used instead.
There may be other parts of Composr that can be vastly simplified to use the new hook functionality, e.g. the newsletter what's new hooks.
Also generally we should review what is using the CMA hooks and see if their use can be better abstracted to functionality from the CMA hook base class or functions in content.php. I don't like that lots of different parts of Composr right now are likely accessing CMA metadata manually and doing weird stuff - it should be more centralised.
Anything that relies on getting images or titles via metadata in CMA hooks should ideally be able to do so even if it requires querying the content row first (e.g. for catalogues). I think right now there are some cases where titles and images just won't be supported for particular content types.