ASPX templates
Version 5.x > ASPX templates > Document Transformation GetImage Not Working View modes: 
User avatar
Member
Member
eric.rovtar-hudsonchapel - 7/30/2010 11:38:54 AM
   
Document Transformation GetImage Not Working
Hi!

I'm trying to use the CMSRepeater to layout images within my site. The repeater is working fine, but the source URL of the images is wrong and shows a 404 error.

Here's my transformation:

<%# GetImage("FileAttachment") %>


Here's what's rendered:

<img alt="" src="/getattachment/98a5bc90-0d50-455d-b40f-97a7face8797/core" border="0" />


All I'm using is the standard File Document type. The funny thing is that, when I'm in CMSDesk and go to preview that image, it shows correctly on the Page tab, but not on the Form tab.

Does anyone have any ideas what's going on?

Thanks!

-Eric

User avatar
Member
Member
eric.rovtar-hudsonchapel - 7/30/2010 2:29:55 PM
   
RE:Document Transformation GetImage Not Working
So.. Let me amend this a bit:

I got it to work with the default File type and using GetDocumentUrl(). However, I'd still like to get this to work with a custom type. Basically, I want to create my own derivative of the default File type.

For example, I want one to be an image, but I also want the attribute "isVideo". Then the transformation will do something different if this value is set to true.

Any ideas?

User avatar
Member
Member
eric.rovtar-hudsonchapel - 8/2/2010 8:17:13 AM
   
RE:Document Transformation GetImage Not Working
Anyone have any feedback/help on this?

Thanks!

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/4/2010 2:56:00 PM
   
RE:Document Transformation GetImage Not Working
Hello,


Do you use workflow?

Could you please take a look at the Form tab, if the document doesn't have expired date? It's possible that this prevent that attachment being published.

What you can see, when looking at CMS Desk -> Content -> document with attachment -> Properties -> General -> Published?


Thank you in advance for your reply.


Best regards,
Helena Grulichova

User avatar
Member
Member
eric.rovtar-hudsonchapel - 8/4/2010 3:41:33 PM
   
RE:Document Transformation GetImage Not Working
It's published. I verified that on the Document Properties. =\

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/6/2010 8:04:05 AM
   
RE:Document Transformation GetImage Not Working
Hello,


Could you please check your “Files friendly URL extension” setting in CMS Site Manager -> Settings -> Choose your web site -> URLs and SEO section?

Files friendly URL extension:

Specifies extension of files friendly URLs that will be used, such as ".aspx" or ".html".


It seems you have a blank value now. Could you please add .aspx there?


Best regards,
Helena Grulichova