Can I use Designer Content for table rows?
Permalink Browser Info Environment
Hi Jordan
How is the progress going on your new Designer Content Pro block? I could really use a block that does repeatable content easily.
I've used DC to create a block for displaying product info that I would like to be able to display in a HTML table - one product per row - but I can't think of a clever way of doing this :(
- Mal
How is the progress going on your new Designer Content Pro block? I could really use a block that does repeatable content easily.
I've used DC to create a block for displaying product info that I would like to be able to display in a HTML table - one product per row - but I can't think of a clever way of doing this :(
- Mal
Type: | Discussion |
---|---|
Status: | New |
Hmmm... I've just had the thought that this would be quite inefficient for a page of say 40 items. Because there would be multiple queries to the DB for the list of items rather than just one... maybe I need to write my own block that pulls a list of these items instead... don't know how yet, though {:)
Hi Mal,
Yeah this is a tricky problem to solve with just Designer Content. (If you only have a few "rows", you can just create a bunch of fields and make them optional for users to fill out -- but if you might have up to 40 this is not a good solution).
Designer Content Pro is getting closer and closer to being ready -- I'm hoping that within a few weeks it will be released (you can sign up for the announcement list here:http://theblockery.com ).
In the meantime, you could just put the "row" wrapper code (<tr><td>...</td></tr>) in the block view.php template itself. Then put the <table> tag around the C5 area in your theme template. This means that the block will only work in that one area (and other blocks will look weird if placed in that area)... so it's not ideal. But maybe good enough for a short-term fix.
-Jordan
Yeah this is a tricky problem to solve with just Designer Content. (If you only have a few "rows", you can just create a bunch of fields and make them optional for users to fill out -- but if you might have up to 40 this is not a good solution).
Designer Content Pro is getting closer and closer to being ready -- I'm hoping that within a few weeks it will be released (you can sign up for the announcement list here:http://theblockery.com ).
In the meantime, you could just put the "row" wrapper code (<tr><td>...</td></tr>) in the block view.php template itself. Then put the <table> tag around the C5 area in your theme template. This means that the block will only work in that one area (and other blocks will look weird if placed in that area)... so it's not ideal. But maybe good enough for a short-term fix.
-Jordan
I ended up using my DC block with the HTML block.
- I created a custom template for the HTML block that removes that annoying DIV wrapper
- My DC block outputs each content item as a table row TR
- I place an open TABLE tag above the list of items and a close TABLE tag at the end
It's working, I am happy :)