Design and CSS styles
Version 5.x > Design and CSS styles > Problems using custom images++ in web part View modes: 
User avatar
Member
Member
lars.kvanum-viasat - 4/8/2010 4:06:32 AM
   
Problems using custom images++ in web part
Hi,

I'm trying to upload a web part to my site, and the stupid thing is working fine - except it doesn't show/load/access any of my images/js/css files.

I've createad a folder in /CMSWebParts/MyCustom/MyWebPart_files with images/ css/ js/ etc underneath it. The web part is located in /CMSWebParts/MyCustom/MyWebPart.ascx

Any help on how to use my files would be greatly appreciated! Btw, I've tried /images/xxx.png, images/xxx.png, ~/images/xxx.png and the full path with no luck.

Cheers!

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 4/8/2010 8:25:40 AM
   
RE:Problems using custom images++ in web part
Hi,

could you please try to use the full path like:

http://<domain>/CMSWebParts/MyCustom/MyWebPart_files/images/xxx.png ?


Best regards,
Helena Grulichova

User avatar
Member
Member
lars.kvanum-viasat - 4/9/2010 6:05:41 AM
   
RE:Problems using custom images++ in web part
Thanks. I was being blind and waaaay too tired to play with anything. Turned out the code I was told to implement had hard coded (wtf, right?) images in the code. In addition to having them hard coded in html...oh, well ;)

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 4/9/2010 6:49:45 AM
   
RE:Problems using custom images++ in web part
Hello,

I am not sure if I got the point. The paths need not to be hard-coded but you can make sure that they work with the full paths. Then you can exchange them with relative paths. Please note that this issue does not relate to Kentico CMS.


Best regards,
Helena Grulichova