Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Galleria integration with ImageGallery

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4
Go to End
Author Topic: 7716 Views
  • Rockshox
    Avatar
    Community Member
    14 Posts

    Re: Galleria integration with ImageGallery Link to this post

    Hey Uncle Cheese. Just wondering if you have had a chance to look into this any further? Regards

  • UncleCheese
    Avatar
    4085 Posts

    Re: Galleria integration with ImageGallery Link to this post

    Yeah, I have it working, but I the CSS is all messed up. I don't really get how that plugin works. I can post the files up here if you want to take a crack at the CSS.

  • Rockshox
    Avatar
    Community Member
    14 Posts

    Re: Galleria integration with ImageGallery Link to this post

    Good work! Yeah, definitely more that happy to help with getting the CSS sorted. Just post up a link to the files.

    As you saw on this forum post I am trying to "include" a Gallery (Galleria) on individual pages on a property listing website I am working on. I am trying to combine the code from the above link with the code below (PropertPage.php), so far I have had little success.

    <?php

    class PropertyPage extends Page {
    static $db = array(
    );
    static $has_one = array(
    'Photo1' => 'Image',
    'Photo2' => 'Image'
    );
       
    function getCMSFields() {
    $fields = parent::getCMSFields();
       
    $fields->addFieldToTab("Root.Content.Images", new
    ImageField('Photo1'));
       
    $fields->addFieldToTab("Root.Content.Images", new
    ImageField('Photo2'));
       
    return $fields;
    }
    }

    class PropertyPage_Controller extends Page_Controller {
       
    }
    ?>

    The website is almost complete except for the individual Galleries. Here is a link to my test site so you can see what I mean: benwellby.com/properties. Click on a property to see where the Gallery should be.

    This shouldn't be too hard to accomplish, but so far I keep stumbling on this particular feature, that said building the website with SS has been a real pleasure (even though my programming knowledge is at best not great).

    As usual, any help is greatly appreciated!
    Cheers

  • UncleCheese
    Avatar
    4085 Posts

    Re: Galleria integration with ImageGallery Link to this post

    I'm not sure what you're trying to do. I don't see any reference to an ImageGalleryPage in your code, or anything resembling the example in that post.

    The galleria zip file is here:

    http://dataobjectmanager.carlinowebdesign.com/assets/galleria.zip

    Just drop the "galleria" folder in your image_gallery/gallery_ui folder.

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: Galleria integration with ImageGallery Link to this post

    UncleCheese you are simple great.....
    galleria works like charm....

  • UncleCheese
    Avatar
    4085 Posts

    Re: Galleria integration with ImageGallery Link to this post

    It does? For me the styling was messed up. If you made any changes to the CSS, please post them so I can roll that into the trunk.

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: Galleria integration with ImageGallery Link to this post

    Hello Uncle Cheese
    i am sorry for late reply but i ahve not made any changes.i have followed your instruction and it worked

  • mathiasmex
    Avatar
    Community Member
    28 Posts

    Re: Galleria integration with ImageGallery Link to this post

    Uncle Cheese,

    just integrated the Galleria into "image_gallery/gallery_ui" with success.

    Hade to make some modifications:

    In "code/Galleria.php" i changed

    Requirements::javascript('jsparty/jquery/jquery.js');

    to

    Requirements::javascript('sapphire/thirdparty/jquery/jquery.js');

    (runninge Silverstripe 2.4.1).

    In "css/galleria.css" following code messed my side up:

    *{margin:0;padding:0}
    body{padding:20px;background:white;background:white;color:#555;font:80%/140% 'helvetica neue',sans-serif;width:870px;margin: 0 auto;}

    Taking this out, all looks fine.

    Maybe this is of interest to someone who wants to use galleria in ImageGallery.

    Regads,

    Mathias

    7716 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.