Having trouble with linked images

Permalink
I'm having trouble with linked images on the bottom of my pages. They display and work properly on the home page, but not on any of the other pages.

Example here:http://gr-concrete.mvwsd.org

The site uses three templates that all include the same linked images on the bottom (above the footer):

right_sidebar.php - which is used for the home page.
default.php - which is a generic left_sidebar style template used everywhere else on the site.
full.php - which is used for my calendar page and can be found under Events (top nav).

The issue is with the two logo images at the bottom of the pages that should link to their respective sites. This only seems to work on the home page - regardless of which template I use. On the inside pages the linked images are visible, but are no longer active links and instead display the linked alt text.

I'm using the same code for all three php templates.

<div id="districtinfo">
         <div id="mvwsdcontainer">
            <div id="mvwsd"><a href="http://www.mvwsd.org/" target="_blank"><img src="themes/graham_theme/images/mvwsd.jpg" width="80" height="80" border="0" alt="Mountain View Whisman School District" /></a></div>
            <div id="grahamaddress"><br />Graham Middle School<br />1175 Castro Street<br />Mountain View, CA 94040<br />(650) 526-3570</div>         
         </div>
            <div id="mvef"><a href="http://www.mvef.org/" target="_blank"><img src="themes/graham_theme/images/mvefbanner.jpg" width="263" height="80" border="0" alt="Mountain View Educational Foundation" /></a></div>
</div>


What is odd is that after changing an offending page to another template, while in edit mode, the images link properly. Once I've saved changes and navigated away and back to the page, or after I've logged out, the images stop working correctly again.

I can change the home page to any of the three templates and the images continue to link properly there - which makes me wonder if I'm missing some critical path concept. Why do they display and link properly on the home page, but not anywhere else?

tgriffin
 
tgriffin replied on at Permalink Reply
tgriffin
new poster and not sure if this is normal, but in the code I pasted above isn't displaying properly - there is a bunch of added html that I didn't include. It looks fine when I'm editing the post, but not once it's displayed in the forum it's wrong. I clearly need help learning how to post before I can get help with my issue...
Doh - sorry.
tgriffin replied on at Permalink Reply
tgriffin
OK, forgetting the fact that I can't seem to post the code without screwing it up - has anybody had similar issues with linked images as part of the php template code?

why do they only link and display properly on the home page?
tgriffin replied on at Permalink Reply
tgriffin
OK - so embedding linked image html into the php isn't the right way to do it anyway.

Instead, I replaced that html with blocks and then added the linked images via page defaults.
NickPifer replied on at Permalink Reply
NickPifer
You shouldn't have a problem with embedding images in the php page. Here's a sample code that I use and it works fine:

<img src="<?=$this->getThemePath()?>/images/logo.gif" width="289" height="96" alt="My Logo" />


Otherwise adding blocks to each page you create can become laborious.

Nick Pifer
tgriffin replied on at Permalink Reply
tgriffin
Thanks, Nick.

It's actually really easy to set it up so all new and all the existing pages have these linked images - and a text content block that I'm also using - populated via the page defaults. Not really laborious at all!

I think the drawback - and it may be that I just haven't explored the options far enough - is that anyone adding a new page, or editing an existing page can remove or replace these linked images --keeping in mind that I want to hand this off to the school staff and parent volunteers.

The idea is that these linked images need to be part of the template and should not be altered. Embedding this info in the php page is really the way to keep them from messing with it. Just went live with the site today (http://graham.mvwsd.org/), so I may have still used your code example otherwise...

Thanks again.

Tom