Hello,
MODx Revolution is about to land on us and there is one killer feature that’s missing: The ability to create custom URL with the API without using MODx document tree alone.
Let me try to explain it further.
On a topic concerning "blogging with MODx", Jason mentionned that if he had the time and the need to, he would use a container on the MODx tree, drop a snippet to load a custom blog engine using it’s own table and cache system outside of the document tree.
Which is a pretty good idea and can be applied to many scenario like Ecommerce, Forums or whatever we can think of.
I would like to take that road but not lose the ability to generate Rewrited URL in the process.
If i have a document named "blog" with container checked. i would land on a page like this one: "
http://localhost/blog/"
Then if i select one of the blog entry i will most likely end with an url like that "
http://localhost/blog/?myarticleid=2"
This is where an api or a plugin can be useful, so that i can transform the previous url to : "
http://localhost/blog/myentry-1.html" for example.
The thing is to be able to catch $_GET[’articleid’] and do some magic with it to build a nice URL just like i can do it with makeUrl().
That my question, is it possible with MODx Revolution ?
If yes, what would be the best way, a built in API function or a plugin (I think that plugin is the way to go) ?
Any example to achieve that behaviour without having to touch the htacess file (only with PHP) ?
Stephane.