Developer.Engineer.Musician.Geek
Hi All,
Good news, I have moved the nested url module to github:
http://github.com/jamespaulmuir/nestedurls
I have been testing the nestedurl module (by writing unit/functional test) and hope to push those to github. As I forgot to mention in my last post about this module, huge props to Andrew Short ( http://the-short.com/ ) for inspiring this module.
Here’s the story:
OSU Libraries have been using code from Andrew’s nested URL branch by creating a diff of his changes, stripping out the non-nestedurl changes, and applying the diff to the stable releases of SilverStripe. We’ve gone from 2.2.2 up to 2.3.3 using the special diff that was created. The reason was because OSU Libraries cannot be running an unstable branch of code on our production site! As of recently, we’ve been having a lot of problems with the nested URLs branch, so it was time to step back and re-evaluate. So, one weekend I sat down with a fresh copy of SilverStripe 2.3.3 and started coding. A few hours later, this module was born. (Again, I can’t say this enough, THANKS Andrew Short for your inspiration for this!).
I wanted to see if this functionality could be put into SilverStripe while changing as little code in sapphire, cms, and jsparty as possible and being very simple so that SilverStripe can be easily updated. I do believe that this module will be fully featured with a new cool feature (more on that in the next section). The changes that I’ve made to the core are just adding some utility (added a setter for allParams to HTTPRequest, and an extend call in SiteTree->Link() … see previous post about nestedurls)
By simply extending SiteTree by adding a field called URLParent, nested URL functionality can be done and also another important feature: The ability to control the entire url structure of your SilverStripe site that is independent from the SiteTree/Menu structure.
For example:
At the Libraries, here is a portion of our Site Tree:
So normally without Nested URLS, these pages would be:
And with nestedurls (using my module, or Andrew Short’s nestedurl branch):
Now, with the new feature of my nestedurl module, I can set the URLParent fields for the following:
And the result is the following:
By default, if there is no URLParent field set for a given page, it will use the Parent field to determine the preceding URL segment. So as you can see, the URLs for WIT (department), and WVC (committee) are nested with departments and committees, respectively, because these page have a NULL value for URLParent so the normal Parent field is used. The “parent url” for committees and departments have been overridden by the URLParent field that we set to 0 earlier (so they jump to the root of the site).
In summary, this module is still under development, and is currently being tested with other modules (googlesitemaps, userforms, dataobjectmanager, imagegallery). I now have the module on Github to track changes and issues. If anyone would like to contribute to this module, let me know! Thanks so much for reading.
I was excited to share about the carmen library link application that is used in Ohio State Universities. I could talk for hours about this, so I decided to write a blog post with more information. If you were not there, to clarify, Carmen is Ohio State University’s Learning Management System (Desire2Learn). This application allows librarians to create subject/resource guides to be delivered within Carmen and stores all content in a REST API. I will be managing an Open Source release of this application sometime in the future (sooner depending on the demand!).
Presentation from LITA lightning talks session 2: http://prezi.com/qw9l0jsy1bvv/
Example of Carmen Library Link “widgets” re-used as Subject Guides on our website: http://library.osu.edu/find/subjects/ (click on one of the subjects)
{
"success": true,
"data": {
"id": "674",
"librarian_id": "1",
"type": "CarmenLink",
"title": "net.TUTOR: Finding Articles",
"description": "this is cool!",
"url": "http://liblearn.osu.edu/tutor/articles/",
"created_at": "2009-09-18 10:18:46",
"updated_at": "2009-09-28 14:55:44",
"created_by": null,
"updated_by": "muir.29@osu.edu",
"html": "
\nnet.TUTOR: Finding Articles
this is cool!
\n
",
"librarian": {
"id": "1",
"email": "muir.29@osu.edu"
},
"widgets": [
{
"id": "376",
"name": "my widget",
"publiclabel": "my widget",
"type": "findArticles",
"librarian_id": "1",
"created_at": "2009-09-18 10:18:40",
"updated_at": "2009-09-18 10:18:40",
"created_by": null,
"updated_by": "muir.29@osu.edu"
}
]
}
}
I may be crazy, but I believe I have been able to get the basic functionality of Nested URLS in a module with only 2 modifications to the core of sapphire.
Goals:
I enjoy all things relating to engineering. I love well engineered consumer products as well as large commercial/military things that come accross my path (for instance: power plants, huge military cargo planes, manufacturing facilities, etc. you get the idea). Currenty I am very much interested in robots. This includes everything from microcontrollers on wheels to humanoid robots. As a part of the Fundamentals of Engineering for Honors program at Ohio State, I was given the opportunity to work in a team of 4 to create a Handy Board based robot to move about a course and compete with other student teams doing the same. This project sparked my interest in robots and computer programming (the Handy Board understands a subset of the C programming language). It also introduced me to product design with Autodesk Inventor. I hope to build another robot from scratch soon. It will be using an Atmel AVR microcontroller (AT90S8535) and thats about all I’ve decided at this point. Does anybody have any good ideas or a “purpose” for this robot? I am also open to making this a collaborative project.
I am Jim and I will be writing about software developing, mechanical engineering, writing and creating music, mobile phone tips/experiences (mostly BlackBerry), computer hardware, and anything else that I might find interesting to share. Hope you enjoy!