I am building template-based pages, and am creating a script to handle the templates.
I've come up with an idea to use a simple XML spec to lay out the directory structure:-
<section title="Company" url="./">
<page title="Team" url="team.php"/>
<page title="Directors" url="board.php"/>
... more "page" tags, incl. nested ones
</section>
The XML files are small - around 530 bytes (0.5kb) each, and loaded once every time a page is loaded.
The PHP script reads/parses the XML file and creates a navigation bar from it for each page.
I have no idea how much this loads the server:-
-Does parsing XML load the server a lot?
-Would I be better off figuring out some system of arrays, and looping through them.
Thanks,
Antun