7956 Posts in 1394 Topics by 945 members
|Go to End||Next >|
22 April 2009 at 4:24am
I'm having trouble using DataObjectManager module. I just installed it and I created a simple one-to-many relationship (like in the doc).
The thing is the CSS templates for the CMS back-end doesn't seem to work. Also, if I edit or add a record, the form is using all the wndow space. I attach some pictures. Is anybody having this issue?
22 April 2009 at 4:31am
Something's messed up with your pathing. Make sure dataobject_manager is installed in your silverstripe root.
22 April 2009 at 4:43am
Thanks for the quick reply.
I did changed the name of the folder in which the module was included to 'dataobject_manager' and it suddenly worked !
If I'm not the only one this would happen, then I would suggest to include this step in the installation procedure!
Thanks, it looks like it's a great feature,
22 April 2009 at 4:47am
What was the name of the folder if it wasn't dataobject_manager? Where did you get it? That's really odd.
22 April 2009 at 4:49am
yea I got a little confused by this at first, it's because if you extract the archive directly to your root the folder is called modules-dataobject_manager-rXXX/ which means the requirements don't work as they look for dataobject_manager/.
Is there a way to make the requirements more dynamic and pick up the name of the folder automatically? Not a huge issue but might get a some people confused as most modules don't mind what the root folder is called.
22 April 2009 at 4:53am Last edited: 22 April 2009 4:53am
Interesting. I think what I need to do is put dataobject_manager in a parent folder so that the ZIP file name does not become the folder name.
Also, to all of you who are using the download, I highly recommend switching to SVN. Updates happen so rapidly to DOM, it's impossible for me to constantly be exporting and posting a new ZIP file to Silverstripe.
22 April 2009 at 11:52am Last edited: 22 April 2009 12:00pm
I used your Testimonials example as a basis for my own Testimonials class and TestimonialsPage type. My page type first displays a random testimonial and then I have previous and next buttons that I want to page through all of the testimonials one by one. I tried using what you added to the image_gallery for next and prev albums as a basis to add this to my TestimonialsPage. However I cannot figure a way for my adjacentTestimonial() function to know the ID of the randomly selected initial Testimonial. I don't know how to set up parameters inside a class and even if I did have a parameter that would hold the Testimonial DataObject I need there is no way of making sure my currentTestimonial function runs before the NextTestimonial and PrevTestimonial functions run so that variable could very well be null and I couldn't get the ID so I could get the next or previous one from the Testimonials table.
Maybe the problem could be approached this from a completely different angle.
One more note: In your ImageGalleryPage.php file that I am using as reference for prev/next functionality, $this->current_album is set in SingleAlbumView() and tested in CurrentAlbum() however I am not sure how this works as I can't find where that is declared.
22 April 2009 at 11:58am
If you want a truly random order with pagination, you need to do one of two things:
2) Store a session variable that is an array of the initial sort order of testimonials, and once set, use that to navigate your testimonials.
Apart from that, I don't know that you can randomly order a record set with every refresh of the page and expect coherent results.
|Go to Top||Next >|