Image Attribute
Permalink
Not sure what I'm missing here.. but I'm simply trying to set up an image attribute on the page.. I've added to <img src="<?php echo $c->getAttribute('image')->getRelativePath(); ?>" width="480" height="320" alt="" align="right"> to the left of my primary container.. and now no content on the page at all shows up unless there's an image attribute applied.. Please help.
Hi Getjoel
Take a look at this, might solve your problem.
http://www.concrete5.org/community/forums/customizing_c5/custom-att...
Take a look at this, might solve your problem.
http://www.concrete5.org/community/forums/customizing_c5/custom-att...
When something like this happens you should look in the source.
You'll most probably see something like
That should give you a sense of what's wrong.
But I just tested the code, and it works fine, so my first guess is that image isn't the attribute name, or that the attribute hasn't been set for that particular page.
Unless you can guarantee that attribute will be set on all pages that you have that code on, you'd want to do something like:
James