Currently, the Fusion grid system pretty much stops at node.tpl.php. This was due to our goal of not going too far in changing the way theming is done.
But because we've also added a node-top and a node-bottom region to the node.tpl.php template, this means that we've also increased the opportunity to add blocks to nodes (beyond just adding them to the Content region).
And this means that your theme can have blocks that are formatted for the grid, with inner gutters and grid widths applied using Skinr, being used in a non-grid region, which breaks layouts when the widths are supposed to add up right.
While there are hacks you can use on a case-by-case basis (e.g., changing the width of blocks with custom css, setting the block widths to less than the full available width, etc.), we'd prefer to implement something that was more clear and robust.
The obvious solution is to push the grid down into node.tpl.php using the grid formatting functions and techniques used in page.tpl.php. But because there are a lot of elements in the node template, formatting everything ends up producing a node.tpl.php that looks quite different and might be off-putting for casual themers or end users looking to make small changes.
The attached .patch file is the entire proposed node.tpl.php file. Most of the changes required can be seen in this file (though there are a few other minor changes that would also need to be made in page.tpl.php, comment-wrapper.tpl.php and in several css files).
After getting some comments on the look of the new node.tpl.php file and the idea in general, I can post a patch for Fusion Core with the complete changeover if anyone is interested in trying it out.
Thanks very much for your input!
| Comment | File | Size | Author |
|---|---|---|---|
| node_tpl_php.patch | 1.09 KB | sociotech |
Comments
Comment #1
_cc_ commentedThis sounds interesting to me. I've been working on a site where a page uses a two column panel (using Panels 3) and I tried to set one column to grid16-3 and the other to grid16-13... well it didn't work and I had to mess about with margins to get it to all line up.
Would this change mean that what I tried to do would just work?
Personally I didn't find the new node.tpl.php any scarier than it was before!
Comment #2
sociotech commentedAfter a lot of testing, it's apparent that there's not a reliable way to apply grid formatting to all the possible content items that can be generated by various sources. So pushing the grid down to the node level is not feasible at this time. Will look again when we convert Fusion to D7.