Try Now
More in this section

Forums / Designing with Sitefinity / .Master and path to images

.Master and path to images

2 posts, 0 answered
  1. Soren Michelsen
    Soren Michelsen avatar
    12 posts
    13 Jul 2012
    22 Dec 2009
    Link to this post
    I have designed a new master page, which includes <table> elements, some with the background-image style property set to point a an image file.

    I have uploaded my image files to a folder (gfx) in the root of the site using the sitefinity file manager page.

    When I create a page based on my master page, no problem. Images are shown and everything.

    But... if I add a sub-page to the first page, all hell breaks loose and no images are shown.

    Any ideas, I am v.e.r.y. new to sitefinity. As in 2-3 hours new. :-)

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    23 Dec 2009
    Link to this post
    Hi Jeppe Jespersen,

    Thank you for using our services.

    You are probably forming the URL to images with ../gfx/image.jpg for example, however this will break the url on deeper levels as will try to look for the image not on the root level but at the same level as the child page. Generally when you apply style like this you should just assign class names to the HTML elements and then provide the style rules in the Theme your Template uses. You should build your theme in App_Themes folder. You can take a look at the following webinar to gain a better perspective on how to build your Sitefinity Templates and Themers - Designing & Skinning with Sitefinity.

    If however you wish to use your current approach you should use the full url to the images: /mysite/

    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered