I need advice and a couple of pointers.
I want to write a plugin implementing dynamic page loading, more or less following this pattern: Rethinking Dynamic Page Replacing Content
I want to do it in a way that I can just enable that feature for navigation links and otherwise forget about it. So, if I have the main part of my pages wrapped in a
<div class="page">, I want the navigation links to dynamically replace the content of that element, with a spinner while loading and a nice fade-in effect. That alone would be easy, but of course, I don’t just want
page.content, I want each page’s HTML rendered via a template for maximum flexibility.
The way I see it, I need to create partial templates for each page (just the
.page element, without navigation, header and
body). And then hook into
onPageContentProcessed in order to render that again with a super template. Does that about sound correct? Is there anything to watch out for? I’m not afraid to read source code, but it’s easier to study an unfamiliar architecture when you got a couple of pointers on where to look. Is there any particular plugin that I might want to read for pointers? Maybe the Page Inject plugin?