Tag Archives: XML

Support for different layouts added to my CMS

I’ve spent the last few days working on the CMS that powers my Raspberry Pi site.  I’ve fixed some bugs in the XML handling code, so now I don’t have to edit the XML files manually when I add new pages.

I’ve also developed a simple API that allows me to call a Python function to print the sidebar and other page furniture.   I’ve changed the layout a bit, so I hope everyone likes the changes.

I’ve implemented a system for defining layouts like this:

post_layout="""
<body>
<div id="container">
{banner}
{navbar}
{bannerad}
<div id="midpage">
{sidebar}
{post_header}
{breadcrumbs}
{posts}
{section_menu}
{comments}
</div><!-- midpage -->
{footer}
</div><!-- end_container -->
<script src="/js/jquery-1.7.2.min.js"></script>
<script src="/js/lightbox.min.js"></script>
</body>
</html>
"""

The API that I developed is used to fill in the parts of the layout in curly brackets.

Most of the site settings can now be edited from within the CMS’s backend, although there’s still a lot of UI development work ahead of me.

I’m hoping to release a beta version of my CMS early in the new year.

Advertisements