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?

ahein624
 
adajad replied on at Permalink Reply
adajad
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.
ahein624 replied on at Permalink Reply
ahein624
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.
adajad replied on at Permalink Reply
adajad
What theme are you using? The header image might be hard coded.
ahein624 replied on at Permalink Reply
ahein624
It is a theme that I built. I have the section set as editable.
adajad replied on at Permalink Reply
adajad
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...
ahein624 replied on at Permalink Reply
ahein624
<!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="">
adajad replied on at Permalink Reply
adajad
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?
<div id="header_image">
    <?php
    $a = new Area('Header_image');
    $a->display($c);
    ?>
    <div style="clear: both;"> </div>
</div>
ahein624 replied on at Permalink Reply 1 Attachment
ahein624
<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
adajad replied on at Permalink Reply
adajad
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?
ahein624 replied on at Permalink Reply 1 Attachment
ahein624
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.
adajad replied on at Permalink Best Answer Reply
adajad
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>
ahein624 replied on at Permalink Reply
ahein624
Perfect! Thank you so much for your help.
adajad replied on at Permalink Reply
adajad
Glad I could help! :)