Jump to:

3445 Posts in 1031 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » logo not showing in tagline SOLVED

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1145 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    logo not showing in tagline SOLVED Link to this post

    Hello
    I'm using black_candy theme with ss 2.3.3 :
    I'm trying to customise the header and to put my logo in it it is a png image this is waht I did

    I edited the the page.ss file in template:

    <div id="Header">
             $SearchForm
              <h1>De L'air</h1>
           <p>your site&#39;s le gazine qui donne a voir e</p>
          </div>

    to

    <div id="Header">
             $SearchForm
    <img src="../images/logo_def.png" alt="de l'air le magazine qui donne à voir " />
          </div>

    It is only showing me the alt phrase but not the images

    Maybe the url is wrong or I missed something

    thanks for help

    Thomas

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: logo not showing in tagline SOLVED Link to this post

    The URL is wrong.

    <img src="../images/logo_def.png" alt="de l'air le magazine qui donne à voir " />

    Since the path is relative to your website root, this will be invalid.

    Ie, the browser is looking for the image at: yourdomain.com/../images/logo_def.png

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: logo not showing in tagline SOLVED Link to this post

    Hi thanks for reply

    do you suggest that I should chage it to :

    <img src="www.mydomain.com/images/logo_def.png" alt="de l'air le magazine qui donne à voir " />

    what I don't get is why it is working with the css files are all the graphics for the menu (for exemple) are selected with that type of paths

    url (../images/logo_def.png" alt="de l'air le magazine qui donne à voir) ;

    Can you help me understand the différence ?

    (I will try you suggestion tomorow and let you know

    Thanks

    T

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: logo not showing in tagline SOLVED Link to this post

    Can you help me understand the différence ?

    Image paths from CSS / JS are taken relative to the file in which they are contained. Eg in a css file the base url is usually themes/themename/css/file.css so to get to images you have to go up a dir and into images - ../images/. Because the templates are compiled (and they have a base url set) image + js paths within a ss file are taken from the base url. Eg yoursite.com. So therefore to get to images you have to go right up - themes/themename/images/

  • servalman
    Avatar
    Community Member
    211 Posts

    Re: logo not showing in tagline SOLVED Link to this post

    Thanks for your explanation it is much clearer now

    Love this cms

    T

    1145 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.