Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

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

Mootools 1.2 Gallery - Can anyone get it to work in SS?


Reply


7 Posts   3436 Views

Avatar
kudesign

Community Member, 64 Posts

9 December 2008 at 11:26pm

Edited: 09/12/2008 11:35pm

I am building a portfolio in my SS site, and have found a good mootools gallery at http://tutorialdog.com

A demo can be seen at tutorial dog: http://tutorialdog.com/image_gallery/sample.html

I have tried to implement this into my SS site, but have had no luck so far.

This is what I did:

1. Upload the required .css and the .js files to appropriate folders in my site
2. In mysite/code/Page.php, I wrote the additional .css & .js files.

Requirements::themedCSS("typography");
      Requirements::themedCSS("form");
      Requirements::themedCSS("accordion");
      Requirements::themedCSS("layout");
      Requirements::themedCSS("imagegallery");
      Requirements::javascript("themes/BrightSide1/javascript/fader.js");
      Requirements::javascript("themes/BrightSide1/javascript/accordion.js");
      Requirements::javascript("themes/BrightSide1/javascript/mootools-12.js");
      Requirements::javascript("themes/BrightSide1/javascript/mootools-12-more.js");
      Requirements::javascript("themes/BrightSide1/javascript/imagegallery.js");

3. Made a new page in the admin, and paste the gallery HTML into the page, then save
4. When I preview the draft page, the gallery did not work, I checked the page source, and see it had loaded the js and css files, but no mootool gallery... the page shows only the css effects. Here is what my page looks like: http://www.kudesign.co.nz/studio/java-test/

Has anyone tried to implement this sort of gallery into SS with success? Sorry I am new to this, and any help will be much appreciated!!!!!!

Avatar
Nivanka

Community Member, 400 Posts

9 December 2008 at 11:49pm

Edited: 09/12/2008 11:54pm

This is definitely possible,

I did a portfolio page recently but with Jquery.

[url]http://www.sitestudio.es/[/url]

Have a look, all you have to do is to think of the view and the controller.

Avatar
kudesign

Community Member, 64 Posts

10 December 2008 at 10:43am

Thanks for the feedback. I checked out your lovely site, love the zoom in-out navigation.

When you say think of the 'view' and 'controller', do you mean 'HTML/css presentation', and the '.js' controller file? If so, this is what I've been thinking, made the HTML/CSS work and previewed fine in dreamweaver, but still could not transfer what I have made into SS.

What ways did you call up the .js files in your SS? Please advise, thanks!

Avatar
Liam

Community Member, 470 Posts

10 December 2008 at 10:57am

When I view the source, I'm pretty sure I see all the css/js files.

You might want to go about adding the css/js files a different way. One way might be to create a custom page type for your gallery page, and then add all the files they want you're doing so, instead of adding to to page.php

The reason being, is this is going to be included on every page on your website, even when you're not using it. Granted, once downloaded it will be cached, but it's still not a proper method of doing so and will increase the page load time of each page.

Avatar
kudesign

Community Member, 64 Posts

10 December 2008 at 11:22am

Great to hear from you. I've been reading a few posts posted by you on the forum:)

Could you please point the direction of where and how I can add a new page type? this sounds like a solution for me.

Thanks a million!

Avatar
kudesign

Community Member, 64 Posts

10 December 2008 at 11:32am

Don't worry, I will have a good read on this article: http://doc.silverstripe.com/doku.php?id=tutorial:2-extending-a-basic-site

and see how I go from there :) cheers.

Avatar
Nivanka

Community Member, 400 Posts

10 December 2008 at 3:05pm

hi kudesign,

yes I am talking about the javascripts and the htmls, also it is not enough, if you are going to have some other content, just like the slide show I have used there you have to make new page types, and make new database tables for them.

All you have to think is that try to arrange the final output to work. so from the backend you have to arrange the templates, php codes (controller), and the database which then will out put what you need.

Try to hack, not just to learn.