img tag in layout.view

Last post 08-04-2008 3:55 PM by KevinTunis. 5 replies.
Page 1 of 1 (6 items)
  • img tag in layout.view

    01-05-2008 2:56 PM

    In the layout.view I have an <img tag but all that displays in the alt text.  where does the src attribute need to be pointed?  It would seem like an obvious question I know but nothing I've tried seems to be working, i.e. images/img1.gif, ../images/img1.gif.  Ideas?  images in CSS show up fine using images/picture.pic but <img elements in the layout.view screen don't return the image.

  • Re: img tag in layout.view

    01-06-2008 4:09 AM

    Hi,

    It is not rendering the image as it has no idea where the image is located.  Rather than use the image tag use the marco Image as shown.

     $macros.Image("images/img4.jpg", "%{alt=''}")

    Regards

    Dave

     

     

    Dave Stokes On Graffiti

  • Re: img tag in layout.view

    01-09-2008 10:50 PM

    Thanks for you help.  However, this isn't working.. Now I'm just getting the full text "$macros.Im . . . " printed out on the screen.

     Here is the relevant section of my theme.

    <div id="container">
       <div id="header">
          $macros.Image("images/logo.gif", "%{alt='text'}", "%{class='logo'}")
          $macros.Image("images/header_text.gif", "%{alt='text'}", "%{class='header-text'}")
       </div><!--/header -->

    here is a shot of the result.

    header

     

  • Re: img tag in layout.view

    01-09-2008 11:58 PM

    After messing around with this for a while, it appears that the problem is the "%{class=''}" parameter is not valid?  Can this be fixed as class is a valid attribute of an <img tag.

  • Re: img tag in layout.view

    01-10-2008 1:57 AM

    Hi,

    Yes, use the following:

    <div id="container">
       <div id="header">
          $macros.Image("images/logo.gif", "%{alt='text' class='logo'}")
          $macros.Image("images/header_text.gif", "%{alt='text' class='header-text'}")
       </div><!--/header -->

    Regards

    Dave

     

    Dave Stokes On Graffiti

  • Re: img tag in layout.view

    08-04-2008 3:55 PM

    I tried this  $macros.Image("images/img4.jpg", "%{alt=''}") in the index.view but have not got my image to show - what could I be doing wrong>


Page 1 of 1 (6 items)