locomotivecms/engine — pull request #839 by yrb (2013-11-16 22:43:53+00:00)
Title: render nested templates correctly when refreshing

When refreshing a node in an existing page, set the site in the context
so nested snippets can be resolved correctly.

This simple fix covers off most of the common cases for nested snippets.

One missing case that I know of is when you edit a nested snippet to add another nested snippet. It won't update the dependent snippets on the page. So if that snippet is edited it wont be updated in the page.

I have a branch that correctly addresses this case, by tracking snippet dependencies in a similar way to how pages currently operate. However if there are loops it can overflow the stack. I have a not so naïve way of implementing it that should resolve this case, but haven't found the time to do it yet.