terraform
                                
                                 terraform copied to clipboard
                                
                                    terraform copied to clipboard
                            
                            
                            
                        Support nested layout: layout with its own layout
Test is included.
Layout for layout is useful, and is supported in Jekyll. I refactored the layout finding code out and call it again in partial() before the first layout is rendered.
All tests are passing.
The earlier layout explicit set to false fix is included too. The code change in lib is moved to helpers/raw.js with the whole layout finding logic. The test is still where it was, though.
Very interesting! This has definitely come up before, even the day before yesterday actually: https://twitter.com/axis12345678/status/387053584065757184
I’m a little unclear on how you actually use it, though. And did it make changes to how layout is used in the _data.json?
It doesn't change how layout is used in _data.json. You just need to set a value to layout for a layout template. For demo usage, you can take a look at the added test case.
Worth noting that Jade already supports nested layouts via extends, block, and prepend/append.
http://www.devthought.com/code/use-jade-blocks-not-layouts/ http://www.learnjade.com/tour/block-append-and-prepend/
Any reason why this isn't in source yet? (For those of us not using Jade. ;)
At least as far as I could determine, it overwrites the default behaviour of layout in a _data.json file. That said, we shouldn’t have left this unresolved, so apologies for that. You can accomplish this now using partial(), but there has definitely been a demand for some kind of nested layouts. We’ll either improve the documentation around an alternate method or take another look at this.
Fair enough. I'm going to blog an example for EJS tomorrow. I'm assuming the thought is something like this (pseudo-code):
top level layout:
partial a header yield partial a footer
lower layout: partial the top header yield partial the top footer
On Thu, Feb 13, 2014 at 5:08 PM, Kenneth Ormandy [email protected]:
At least as far as I could determine, it overwrites the default behaviour of layout in a _data.json file. That said, we shouldn't have left this unresolved, so apologies for that. You can accomplish this now using partial(), but there has definitely been a demand for some kind of nested layouts. We'll either improve the documentation around an alternate method or take another look at this.
Reply to this email directly or view it on GitHubhttps://github.com/sintaxi/terraform/pull/14#issuecomment-35037826 .
Raymond Camden, Web Developer for Adobe
Email : [email protected] Blog : www.raymondcamden.com Twitter: cfjedimaster