ImageGallery Alternative View

Dec 2, 2011 at 9:12 AM

Hi,

I am trying to override the ImageGallery view so that I can pass some different settings for the image locations as my site is using url rewriting so the urls in the js are incorrect.  I have taken a copy of the ImageGallery.cshtml and copied it to my view folder in my custom theme.  I have names it Parts.ImageGallery.cshtml.  However when loading the page it is not using this view??  I have attempted to use the shape tracing tool but it only shows a DisplayTemplate shape where I have the ImageGallery widget on the page.

Any ideas?

Thanks

Jeff

Coordinator
Dec 2, 2011 at 10:18 AM

Hi Jeff

I know what you mean. I used the shape tracing and didn’t find a way to get an alternate for that. I think this is due to the way the Part is rendered. Inside ImageGalleryDriver, in the Display method the DisplayTemplate method of shapeHelper is called instead of using the “Part_ImageGallery” syntax. This has been done so the plugins could declare their own TemplateName. This has been coded some time ago when my understanding of Orchard very superficial ;-)

Probably there’s a workaround for this, but the definitive solution will require some code changes. I’ll keep that in mind for future releases.

To get your work done, I think you could change the module code directly.

Sorry for the inconvenience,

Gabriel

Dec 4, 2011 at 11:53 AM

Thanks Gabriel, I will modify the source, would be great if this could be fixed in a future release.

Thanks :)