Portal Engine
Version 2.x > Portal Engine > Referencing images in app_themes on subpages View modes: 
User avatar
Member
Member
jonathanchauncey@fdle.state.fl.us - 12/12/2007 5:20:03 PM
   
Referencing images in app_themes on subpages
If you have a template that uses images out of the app_themes directory how do you allow it to reference these images from nested subpages?

/page1/subpage1.aspx
/page1/subpage1/subpage2.aspx

Defining the paths as absolute is definitely not something I would like to do. Is there a way to grab resources from the app_themes folder similar to the CSS method??


User avatar
Member
Member
webwise - 12/12/2007 8:45:26 PM
   
RE:Referencing images in app_themes on subpages
Mr. Chauncy...

Would this be what you are looking for?

http://www.kentico.com/DevNet/Knowledge-base/portalengine/Using-different-graphics-for-different-site-sectio.aspx

If not, can you explain in more detail? I understand your project quite well...So...

Neil

User avatar
Member
Member
jonathanchauncey@fdle.state.fl.us - 12/13/2007 3:25:01 PM
   
RE:Referencing images in app_themes on subpages
Ok in the app_themes folder I have an images folder which contains all the background/header/footer graphics needed for the entire site.

As long as the pages are located directly under the root the template displays the images just fine. However, if I create a page on the 2nd level the images are not displayed because it treats the parent document as a sub folder.

The only solution I have found so far is to tell each page that it is located at the root.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/8/2008 2:44:10 PM
   
RE:Referencing images in app_themes on subpages
Hi,
what is the current path format you are using? Are you using format like "../folder/file"? If yes, could you please try to use tilde (~) instead the dots (..)? The URL rewriter should resolve the path correctly. If the problem remains, could you please send us an e-mail to support@kentico.com and attach the export package of your site so we can inspect the problem?
Thank you in advance.

Best Regards,
Juraj Ondrus
Support Engineer

User avatar
Member
Member
awalters-designkitchen - 8/28/2008 2:46:37 PM
   
RE:Referencing images in app_themes on subpages
I'm having the same issue, however, i'm trying to access an image from a control on two different level paths using the same control. So my image is stored in the CMSWebParts/Custom/Controlname_Files/<image>

I've tried both ~, ../ and ./ nothing works for both pages. Suggestions please!

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/29/2008 3:15:07 AM
   
RE:Referencing images in app_themes on subpages
Hi,

Could you please try to use path like this: ~/CMSWebparts/<webpartfolder>/webpartname_file/<files>



Best Regards,
Juraj Ondrus