This project is read-only.

Image gallery doesn't work on a specific theme

Aug 30, 2011 at 2:34 PM

Hello,

first let me thank you for this great and effective module.

Alas, I am not able to make it work on a specific theme that my customer bought. The thumbnails are showed not styled, clicking on a TN simply opens the picture without the lightbox magic. 

When I look at the  genereated html I see that something is missing, compared to what I see generated on the plain thememachine theme...

here's the missing html:

<link href="/Modules/Mello.ImageGallery/Styles/image-gallery.css" rel="stylesheet" type="text/css" />

 

and 

 

<script type="text/javascript">
  $(document).ready(function () {
  $('.image-gallery a').lightBox({imageBlank : '/Modules/Mello.ImageGallery/Content/Plugins/LightBox/Images/lightbox-blank.gif' ,
  imageBtnClose: '/Modules/Mello.ImageGallery/Content/Plugins/LightBox/Images/lightbox-btn-close.gif' ,
  imageBtnPrev: '/Modules/Mello.ImageGallery/Content/Plugins/LightBox/Images/lightbox-btn-prev.gif' ,
  imageBtnNext: '/Modules/Mello.ImageGallery/Content/Plugins/LightBox/Images/lightbox-btn-next.gif' ,
  imageLoading: '/Modules/Mello.ImageGallery/Content/Plugins/LightBox/Images/lightbox-ico-loading.gif'
  }
  );
  });
  </script>

the lightbox css and js are present.

I do not know where in the pipeline the module fails to inject the code, or more probably the theme overwrites it.

Have you got any clue on how to fix this problem?

Thank you in advance,

marco 

Aug 30, 2011 at 2:57 PM

Hey Marco,

Did you create a alternate for the ImageGallery.cshtml? If you overwrote this view in some way, it's possibly not adding those missing html.

Take a look at "Views\DisplayTemplates\Parts\ImageGallery.cshtml", there you'll find both the Style.Require("ImageGallery"); that includes the CSS and the  @Html.ImageGalleryScript helper that creates the script for the selected plugin (LightBox in this case).

I hope it helps,

Gabriel Mello

Aug 30, 2011 at 3:11 PM

Hi Gabriel,

I did not create any alternate, and I do not have the Views\DisplayTemplates\Parts\ImageGallery.cshtml file...

The theme I'm working on is the dark theme from bind.pt

 

Thanks,

m.

Aug 30, 2011 at 3:30 PM

I just tested it with the theme provided on the Orchard Gallery: http://www.orchardproject.net/gallery/List/Themes/Orchard.Theme.Dark

It worked both using the Image Gallery Part and Image Gallery Widget.

What I did:

  •  Installed Orchard 
  • Installed ImageGallery 
  • Created Image Gallery and images 
  • Installed the Theme 
  • Created a custom Content Type with the Image Gallery Part and it worked. 
  • Added a Image Gallery Widget to the home page, and it worked.

Could you please detail if you made something different? Could you please provide the path that you Orchard is installed, if you're using Azure or not and any other relevant info?

Aug 30, 2011 at 3:42 PM
Edited Aug 30, 2011 at 3:46 PM

The only different thing I did is that I have used the full commercial theme, not the free one available on the gallery.

the website I'm testing it is installed at

C:\Users\myname\Documents\My Web Sites\orchard

 

This is  a clean install just to test if any of my mods could be blamed for the problem.

Aug 30, 2011 at 4:09 PM

I tried using the same folder structure and it still working. Could you please create a website from scratch using the theme from Orchard Gallery?

If the problem is the commercial theme, I think it would be better to contact the theme developers maybe they can give you some insight on what is different in this theme.

Gabriel Mello