Placing and Image As Attribute
Permalink 1 user found helpful
I want to add an image per page, such as a heading image, as an attribute. However, I am new to the programming environment. How would I go about doing this?

I wouldn't use a page attribute for header images but rather add the image to the page type default in question. If you want different images on several pages using the same page type you can always override the page default when editing the page.
Ok. The issue is that for whatever reason when I go to edit the
section. I do not get the fly out with the option to edit the header
section image. So I was trying to figure out a work around.
section. I do not get the fly out with the option to edit the header
section image. So I was trying to figure out a work around.
What theme are you using? The header image might be hard coded.
It is a theme that I built. I have the section set as editable.
Could you post the content of your header.php file?
Have you followed read this? http://www.concrete5.org/documentation/how-tos/designers/making-a-t...
Have you followed read this? http://www.concrete5.org/documentation/how-tos/designers/making-a-t...
<!doctype html> <html> <head> <!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--> <!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--> <!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--> <!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--> <!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]--> <!-- the "no-js" class is for Modernizr. --> <meta charset="utf-8"> <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <?php Loader::element('header_required'); ?> <meta name="title" content="">
Viewing 15 lines of 47 lines. View entire code block.
Hmm... sorry I assumed the code for the header image was in your header.php file...
Are you using something like this for your header image area?
Are you using something like this for your header image area?
<div id="header_image"> <?php $a = new Area('Header_image'); $a->display($c); ?> <div style="clear: both;"> </div> </div>
<div id="sub_img"><?php $a = new Area('Image Top'); $a->display($c); ?></div>
this is what I use.
I took a screen shot for you. When I hover over everything aside from the image top area, I am able to edit
weird
No strange or missing css rules/declarations applied to #sub_image or it's container?
Just to cover all bases:
Have you cleared site cache?
Clear browser cache?
Have you logged out and in again?
No strange or missing css rules/declarations applied to #sub_image or it's container?
Just to cover all bases:
Have you cleared site cache?
Clear browser cache?
Have you logged out and in again?
Good spot. The CSS had a z index of -3. Which I forgot about. This was throwing off the edit area.Though how do I make the page title appear above the image whilst still being able to edit the area.
Try this:
<?php $is_edit_mode = Page::getCurrentPage()->isEditMode() ?> <div id="sub_img" <?php if(!$is_edit_mode){echo 'style="z-index:-3"'};?>><?php $a = new Area('Image Top'); $a->display($c); ?></div>
Perfect! Thank you so much for your help.
Glad I could help! :)