Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Referencing media library images in css View modes: 
User avatar
Member
Member
tjadoon-gmail - 2/20/2013 3:28:17 PM
   
Referencing media library images in css
Following is the link from the source…

<link href="/cms/CMSPages/GetResource.ashx?stylesheetname=MainCss" type="text/css" rel="stylesheet"/>

So, does GetResource.ashx pushes the MainCss as /cms/MainCss to the browser?


media library link on local dev is like

/MySite/MySite/media…

And on prod site it is

/cms/MySite/media…


From inside the above referenced styles sheet, how can I get to an image in the media library? I don’t want to put the image under App_Themes.


Following is not working for me:
../MySite/media…

User avatar
Member
Member
tjadoon-gmail - 2/20/2013 5:37:35 PM
   
RE:Referencing media library images in css
this works for me
../getmedia/3ddb4418-430d-40d7-8ffd-e143b0512851/background.aspx

but this doesn't
../MySite/media/../background.jpg

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/23/2013 12:19:33 PM
   
RE:Referencing media library images in css
Look on your physical disk and you should find the physical file location. For instance if you have a media library named Testing with 2 directories in it (one and two) you should be able to access the files by going to /SiteName/Testing/one/image.jpg.

There are some settings in Site Manager that also specify if the media library utilizes a special directory or not. Your best bet would be to navigate to the file system on your computer to find it.

User avatar
Member
Member
tjadoon-gmail - 2/24/2013 11:30:44 AM
   
RE:Referencing media library images in css
This worked for me after upgrading to 7.0.21. Support suggested this upgrade as the issue was identified as bug in 7.0.