Jump to:

10843 Posts in 2514 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Gallery: show image details

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4
Go to End
Author Topic: 4356 Views
  • pinkp
    Avatar
    Community Member
    168 Posts

    Re: Gallery: show image details Link to this post

    It was the host like you said. I had to create a php5.ini file with the contents:
    display_errors = on
    error_reporting = E_ALL

    So now I know the error is:

    Fatal error: Class 'ImageGallery_Controller' not found in /home/sites/mysite.co.uk/public_html/mysite/code/MyImageGalleryPage.php on line 6

    Do you know how I fix this please?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Gallery: show image details Link to this post

    Change

    class MyImageGalleryPage_Controller extends ImageGallery_Controller {

    to

    class MyImageGalleryPage_Controller extends ImageGalleryPage_Controller {

  • pinkp
    Avatar
    Community Member
    168 Posts

    Re: Gallery: show image details Link to this post

    BINGO! all works like a charm, thanks so much for your help UncleCheese!!! wicked.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Gallery: show image details Link to this post

    That's great! I haven't had too many users customize the ImageGallery classes, so it's good to know that it's that easy.

  • pinkp
    Avatar
    Community Member
    168 Posts

    Re: Gallery: show image details Link to this post

    I'd didn't realise it would create a brand new page type (noob error I expect) so it just means I have to re-build the gallery page but thats fine! all the new options are in the pop-up box and they show in the live site, just need to add my red dot images etc.
    I will post the link to the final site when its finished as an example of it in action. Thanks again!

  • pinkp
    Avatar
    Community Member
    168 Posts

    Re: Gallery: show image details Link to this post

    Couple more points. After you add the details and you have a couple of rows of images the titles are covered by the next row of images. I fixed this by increasing the bottom-padding of the li in the CSS. Just in case that is helpful for anyone who tries this.

    ---------------------

    Also though, the "Allow drag & drop reordering" is not having an effect on the actual live page. I can still check the box move my images and save etc. But this does not show on the front end only in the CMS?

    It is still working fine with the ImageGalleryPage just not the MyImageGalleryPages??
    Any ideas why this might be?

    -Thank You

  • pinkp
    Avatar
    Community Member
    168 Posts

    Re: Gallery: show image details Link to this post

    Could the drag and drop not be working in the new pages MyImageGalleryPage because of this that I read in the docs?:

    "Activate Drag-and-Drop Sorting

    Because drag-and-drop sorting adds custom functionality to all eligible DataObject subclasses, the DataObjectManager requires that the user opt into sorting capability.

    mysite/_config.php

    SortableDataObject::add_sortable_class('Testimonial');

    After running a /dev/build, the following will be modified to give Testimonials sorting capability.

    *
    The field SortOrder will be added to the Testimonial table

    *
    The $default_sort property of the Testimonial will be set to SortOrder. This will ensure that the frontend template displays the objects in the correct order.

    Note: To add several sortable classes at once, use SortableDataObject::add_sortable_classes(array $classNames)
    "

  • UncleCheese
    Avatar
    4085 Posts

    Re: Gallery: show image details Link to this post

    Yes. Very good point. You need to add to your mysite/_config.php:

    SortableDataObject::add_sortable_class("MyImageGalleryItem");

    and build.

    4356 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.