2

I want to do this without porting the fluid grid module to 7 from 6. I can't for the life of me get a view page of images to work with Masonry.

Does anyone has experience with this and know how to get it working with just masonry.js and not a module?

Thanks

1
  • Why no module? Masonry would do everything you need.
    – Chapabu
    Nov 29, 2012 at 10:49

2 Answers 2

6

There's actually a Masonry module now

Makes the jQuery Masonry plugin available to Drupal as a library.

1

i just took a short look at masonry .., you can add the masonry.js to your theme, and add a custom .js with a drupal.behavoir containing your masonry code - but this will be used on every page. the

you can do the same in a custom module for dedicated includes; only when your view is displayed.

2
  • Could you explain in detail how to do it? Does it require to make a module from scratch? Apr 14, 2012 at 6:35
  • 1
    yeah - a custom module from scratch, using fe. hook_views_post_render to attach the js for your identified view.
    – rémy
    Apr 15, 2012 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.