Developer forum

Forum » Templates » Picture not showing on webpage

Picture not showing on webpage


Reply
 I am trying to put a image in my markup accourdingly to a design, but am unable to see it when I view my page frontend (www.legeplaneten.dk) I have checked my code as sell as the img source reference and found no errors. I am implementing the new design structure on the solution that Im working on..

Replies

 
Nicolai Høeg Pedersen
Reply
Can you be more specfic?

Are you adding an <img src=""> to your layout file? If so, please post the code or attach the template.
 
Reply
hi np..
I will include a template and a css section to display it. It seems that no mather what I do, the image will not show on the page. I have done a view page source, and the markup code for the image does not show there either.. 
first the markup:

<div id="middlecolumn" class="dwcontent" title="Middle Content Area">
<div class="paragraph">
    maincontent
</div>
<div class="paragraph">
    maincontent
</div>
<div class="paragraph">
<img src="images/pad_illu.jpg" id="pad_illu" border="0" alt="" />
    maincontent
</div>
<div class="paragraph">                      
</div> 
</div>

and then the CSS that styles it..:

div#middlecolumn div.paragraph img#pad_illu{
border:0px;
position:absolute;
right:50px;
top:245px;
width:60px;
height:60px;
z-index:99;
}


 
 
Reply
Hi Tom

The path should be '/files/templates/designs/legeplaneten/images/'

// Dammark
 
Reply
Hi Sebastian.
That had no effect.. The image is still not showing up on the webpage.
 
Nicolai Høeg Pedersen
Reply
The path is ok - the parser will take care of that.

The problem is that inner html of your defined content area is stripped when parsed. So everything marked with yellow is replaced by the parser which adds a template tag to this location. Take a loo at the .parsed.html in the filemanager.

<div id="middlecolumn" class="dwcontent" title="Middle Content Area">
                    <div class="paragraph">
                     maincontent
                    </div>
                    <div class="paragraph">
                     maincontent
                    </div>
                    <div class="paragraph">
                         <img src="files/templates/designs/legeplaneten/images/pad_illu.jpg" id="pad_illu" border="0" alt="" />
                     maincontent
                    </div>
                    <div class="paragraph">                      
                    </div> 
               </div>

If you do not want the parser to strip the inner html, take a look at page 25 in manual - how to do that. and page 24 to see what happens when things are parsed.
 
Reply
Ahhh .... now I get it.

It's not on the URL postet in the starting post ... remember to post the real URL.
The real link is: http://www.legeplaneten.dk/FORSIDE.aspx?ID=48

You're inserting the image inside the DIV with the class 'dwcontent' directly in yhour layout template.

Everything inside this DIV will be replaced with the content from the page in the CMS.
This is the idea with the new layout templates.

So you need to put the image outside the DIV with the class 'dwcontent'

Remember to always give the full URL and the name of the template file you're working on.

// Dammark

 
Reply
Thanks guys.
That did the trick.

 

You must be logged in to post in the forum