The Blog and Portfolio of Chris Mendoza
Blog    Portfolio    Contact
Rewrite Rules & Conditionals...
This evening as I began developing the second module, (the gallery/portfolio module) I came across an issue which I had not previously thought about. I had initially created a function to rewrite URLs in the framework object and was adding rewrite rules to it as I came to need them.

Obviously the issue with that is, if anyone were to create a custom module for the engine, it would then need to modify the framework, something that I definitely want to avoid if possible. So in the interests of making everything as plug and play as possible, I have moved the rewrite rules to their associated child class and have written a script in the framework to call that function in each open class just before the code is outputted.

Hopefully this will aid in the future creation of modules as planned.

I have also added a new switch to the module language up to now the framework parsed anything contained within the tags such as 'blog {call:view_post;}'. This became an issue if say you had content in the header that you only wanted to show up on certain pages (such as a list of blog pages, which should only show up when viewing blog pages).

The new tag format is 'blog {call:view_post; if:page1,page2,etc;}' which allows users to specify which pages they want a command to be called.
Feb 26th, 2007 12:17:24 am
0 Comment(s)
There are no comments for this post.
Name (Required)
Email (Not Published)
Website
Message
© Chris Mendoza 2007