2 ms·
Yeah. I did this too. Mine's driven off a database with a structure of 1. pages, each of which may or may not have a parent pageID; the entire tree is read and
by noduerme 2y ago
Yeah. I did this too. Mine's driven off a database with a structure of
1. pages, each of which may or may not have a parent pageID; the entire tree is read and parsed to generate the menu system and links/sub-links
2. modules which reference HTML templates to load through a parser that replaces areas with {{handlebar}} variables written by the clients through their own API
3. something like page_modules which locate the modules on the page,
4. a renderer which uses the above stuff to make the menu system, figure out what URL people are trying to get to, load the page, load the modules in the page, and fill in the crap the client wrote inside the {{handlebars}}
This has worked so well for so long that I can basically spin up a website in 15 minutes for a new client, let them fill in anything I want them to by themselves, throw some art on it and call it a day.
It worked so well that I ended up writing a newer version that uses a bunch of Javascript to accomplish basically the same thing with smoother transitions in a single-page app that doesn't look or act like an SPA, but it was basically pointless.