alchime.net Posted February 12, 2013 Share Posted February 12, 2013 On that page http://processwire.com/blogtest/posts/gallery-test/ it's seem that there is a module (?) gallery already done for PW. Is it possible to incorporate it without all the blog stuff ? Thanks in advance for your answers. Link to comment Share on other sites More sharing options...
Philipp Posted February 12, 2013 Share Posted February 12, 2013 Don't know if it is a module but I think it's just using Processwire with Fancybox Output the images from a page(using the standard images field) and Make Thumbnails +the right anchor around them. I'm using a simple (and ugly) PHP+HTML Loop through all images on the page as $i. One way to generate Thumbnails is to use the size(width,height) function. foreach($page->images as $i) { echo '<a href="' . $i->url . '" class="fancy" rel="gallery-1">'; //The anchor for Fancybox echo '<img src="' . $i->size(120,120)->url . '" width="120" height="120" alt="Thumbnail"/>'; //The Thumbnail echo '</a>'; } Then include the fancybox JS and let jQuery do its magic $('.fancy').fancybox() . Read the manual and see how you can modify the behavior of the fancybox. Link to comment Share on other sites More sharing options...
Joss Posted February 12, 2013 Share Posted February 12, 2013 Yes, there is no gallery that comes with PW, basically because it is so easy to create one in any shape you wish. Phillip has shown the most obvious method. Make sure that your image field is set to however many images you want (0 for unlimited or put a fixed number in there to limit users so they dont go mad). Then you can output them either as a straight list of images, as Philip has done, or dig around for a nice JQuery plugin to do interesting stuff with. For instance, this is one I did using Flexslider (I think). http://pwdemo1.stonywebsites.co.uk/galleries/devon/ On this one I also used the Thumbnails images module rather than the normal images as it allowed me to mess around with cropping the thumbnail if I needed. I also used a repeater field so that I could add a TinyMCE field for doing the captions rather than just the images description field. But essentially the theory is as Philip mapped out for you. Link to comment Share on other sites More sharing options...
alchime.net Posted February 19, 2013 Author Share Posted February 19, 2013 thanks for those answers Link to comment Share on other sites More sharing options...
MatthewSchenker Posted February 19, 2013 Share Posted February 19, 2013 Greetings alchime.net, As others have said, getting a gallery running in ProcessWire is easy with some JQuery. Joss mentions FlexSlider, which is one of my favorites as well. Galleria is another great gallery option. Check this post, where I wrote up some documentation on getting Galleria running in ProcessWire: http://processwire.com/talk/topic/2533-first-site-first-problem/?p=24929 Come on back if you have other questions. Thanks, Matthew 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now