Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Image Gallery parsing doctypes View modes: 
User avatar
Member
Member
rdiepenbrock - 8/20/2009 10:28:27 AM
   
Image Gallery parsing doctypes
I have written a custom doctype to upload images to the database. This doctype contains the fields file name, file credit, file caption, file attachment and file thumbnail. There is also a checkbox for 'include in image gallery'.

The image gallery web part reads the CMS.File classname. What do I need to do to modify the image gallery code to read the custom doctype I have created?

Thanks,
Richard

User avatar
Member
Member
rdiepenbrock - 8/24/2009 9:47:22 AM
   
RE:Image Gallery parsing doctypes
Anyone have a suggestion about this issue?
Thanks.

User avatar
Member
Member
Jagr - 8/24/2009 10:26:01 AM
   
RE:Image Gallery parsing doctypes
Hi,

I am not sure if this might be a solution but I would like to try :)

Create a new transformation in your custom doctype and select that transformation from the Image gallery web part.

I didn't try it, but this is the first thing that occured to me :)

Cheers :)

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 8/24/2009 10:27:38 AM
   
RE:Image Gallery parsing doctypes
Hi,

You need to modify ~\CMSWebParts\Viewers\ImageGallery.ascx file for this purpose. There should be following code, which you need to modify:

<cms:CMSDataList ID="lstImages" runat="server" ClassNames="CMS.File" EnablePaging="true" />

Best Regards,
Miroslav Remias.

User avatar
Member
Member
rdiepenbrock - 8/24/2009 2:59:42 PM
   
RE:Image Gallery parsing doctypes
The problem isn't the transformation. The image gallery is not reading the doctype referencing the transformation.

The cms.file doctype will, of course, work, but it does not contain the information fields I want to display from the database.

I modified both image gallery (ascx.cs and ascx) files and removed "cms.file" from the classname property. This did not solve the issue.

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 8/26/2009 6:35:21 AM
   
RE:Image Gallery parsing doctypes
Hi,

There should be also following code in SetupControl() method of this web part:

this.lstImages.ClassNames = "cms.file";

Please change it to your custom document type class name. I have created custom document type (custom.file) and modify these two settings and it is working just fine. Please also check your transformation.

Best Regards,
Miroslav Remias

User avatar
Member
Member
rdiepenbrock - 8/31/2009 12:40:36 PM
   
RE:Image Gallery parsing doctypes
That worked. I thought I had done that as one of the first attempts. But, it's reading the doctype now.