Jump to:

3443 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » PrettyPhoto install

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

Page: 1
Go to End
Author Topic: 2386 Views
  • Edward Cutty
    Avatar
    Community Member
    4 Posts

    PrettyPhoto install Link to this post

    Hi all, i'm new here, hope this is the right section.

    I'm trying to install PrettyPhoto module to add lightbox style to my images. The README file is not so clear; i've install the module, run dev/build and added the following code to my Page.php

    public function init()
    {
    parent::init();
    PrettyPhoto::include_code();
    }

    To my <a> tag i've also added:

    <a href="$MyGalleryImage.URL" rel="prettyPhoto[gallery]"><img src="$MyGalleryImage.URL" width="120" /></a>

    but it doesn't work.

    I've also add this to my _config.php file (as suggested in the config file in the module)

    PrettyPhoto::set_theme("dark_rounded");
    PrettyPhoto::set_more_config("AnimationSpeed: 'slow', opacity: 0.30, showTitle: false");

    Any suggestion?

    Thanks

    ed

  • Edward Cutty
    Avatar
    Community Member
    4 Posts

    Re: PrettyPhoto install Link to this post

    solved: the PrettyPhoto.php file doesn't include jquery, so i've included it by myself.

    bye

  • Wil
    Avatar
    Community Member
    15 Posts

    Re: PrettyPhoto install Link to this post

    Hello:

    How did you include the jquery in the prettyphoto.php? I am totally green with PHP and wouldn't know how to do this.

    tx

    Wil

    2386 Views
Page: 1
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.