5542 Posts in 1739 Topics by 1225 members
|Go to End|
18 March 2009 at 8:51pm Last edited: 19 March 2009 4:05am
I made a News module (to get to know SilverStripe better) which is largely based on the Article tutorial.
Few things I'm stuck at and would appreciate some help with:
I've added pagination to the module, however the urls of the pagination pages are in the form off /news/?start=5
How would one go about transforming those urls into something like /news/5/.
On IRC someone mentioned $url_handlers, but i can't seem to figure out how this works, nor do i know if this is the proper approach.
All the module files are located in a folder called "News" which is located in the site's root.
This way I can easily implement the module on various sites.
However if i would want to extend the base functionality (say add a field, or change a field's type, make a field mandatory, etc etc), how would this be done.
Normally you would extend a class, but then wouldn't I end up with a "NewsArticle" page type AND a "CustNewsArticle" page type?
Lastly, how do you make a field obligated in the backend?
For example with the News module i added a PublishDate field on top of the "Page"'s field, now i would like that field to always to be filled in.
Any help would be appreciated here.
Thanks in advance!
|Go to Top|