Forums / Templates, Stylesheets, Page Layout / trying to change sidebox header w/image

trying to change sidebox header w/image

Locked

Views: 2,975

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
23 Jan 2008, 4:23 AM
#1
tonkali avatar

tonkali

New Zenner

Join Date:
Sep 2006
Location:
NYC
Posts:
76
Plugin Contributions:
0

trying to change sidebox header w/image

I'm trying to replace the sidebox headers with images and have implemented this with 1 header, Categories (which has been renamed to Products).

The second header "Reviews" is not rendering, below is my code:

My includes/languages/CUSTOM/english.php reads:

define('BOX_HEADING_REVIEWS', 'reviews_hdr.gif');

and I have added in my includes/modules/sideboxes/CUSTOM/categories.php:

$title = zen_image($template->get_template_dir(BOX_HEADING_CATEGORIES, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . BOX_HEADING_REVIEWS);
    $title_link = false;

but it's producing only the image name, HERE

Can someone please help to enlighten me

23 Jan 2008, 8:21 AM
#3
tonkali avatar

tonkali

New Zenner

Join Date:
Sep 2006
Location:
NYC
Posts:
76
Plugin Contributions:
0

Re: trying to change sidebox header w/image

thanks for the reply Misty :smile:, very much appreciated. I followed the tutorial but somehow it's not working, will check out the thread you pointed to.

thanks again, c.

23 Jan 2008, 8:42 AM
#4
tonkali avatar

tonkali

New Zenner

Join Date:
Sep 2006
Location:
NYC
Posts:
76
Plugin Contributions:
0

Re: trying to change sidebox header w/image

I don't get this, I followed the tut and even tried styling it out:

#reviewsHeading {
background: url(../images/reviews_hdr.gif) no-repeat fixed #FDF48B;
margin: 0em;
padding: 0em;
}

and it doesn't work :(

23 Jan 2008, 8:49 AM
#5
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: trying to change sidebox header w/image

Coding incorrect
should be

#reviewsHeading {
background-image: url(../images/reviews_hdr.gif);
background-repeat:no-repeat;
margin: 0em;
padding: 0em;
}

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

23 Jan 2008, 9:36 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: trying to change sidebox header w/image

Actually, that shorthand background property is correctly coded, and is even a recommended way to do it where practical.

You might want to look at the Image Titles mod, which takes care of the coding more efficiently and only requires you to load images named according to a system for whichever boxes you want to use them on.

23 Jan 2008, 9:50 AM
#7
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: trying to change sidebox header w/image

Actually, that shorthand background property is correctly coded, and is even a recommended way to do it where practical.
So posters original css code should be working then if
image path set correctly?

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

23 Jan 2008, 9:57 AM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: trying to change sidebox header w/image

If all else is kosher, yes. I didn't look at whether the CSS will get applied where it is wanted, only that the property is correctly coded.

23 Jan 2008, 10:01 AM
#9
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: trying to change sidebox header w/image

Thanks for clarifying..visited member's site,
reviews heading looks to be working ok now.

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

23 Jan 2008, 10:11 AM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: trying to change sidebox header w/image

The reviews heading is applied to the categories box. The reviews box still has the filename showing instead of the image.

Tonkali, the method you are using will require you to edit a separate file for every sidebox; Image Titles does the edit in one file for left boxes and one for right boxes, and also accounts for the "[more]" after some box headings, which the cleanest method, specifying the whole image output in the define, doesn't do.

23 Jan 2008, 3:07 PM
#11
tonkali avatar

tonkali

New Zenner

Join Date:
Sep 2006
Location:
NYC
Posts:
76
Plugin Contributions:
0

Re: trying to change sidebox header w/image

gjh42, you're the bomb :clap:!!!! I failed to remember that each sidebox has it's own .php file and was replicating this

$title = zen_image($template->get_template_dir(BOX_HEADING_CATEGORIES, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . BOX_HEADING_REVIEWS);
    $title_link = false;

in the categories.php file and changing the BOX_HEADING_??? part of the code for every sidebox. :frusty:, like that worked.

Misty--> yeah, i'm a bit rusty with my css but prefer to use shorthand. After a while, all that code becomes inundating to look at in long-hand and takes days to scroll thru.

Thank you both very much your help is much appreciated!!!

6 Mar 2008, 5:24 PM
#12
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: trying to change sidebox header w/image

Thanks for the link to the other post, it all worked perfectly but in Firefox, there's a tiny gap in the search sidebox, between the content and the bottom. Any ideas why?

http://www.trishjonesdesigns.com/emporium/index.php

Thanks!

21 Mar 2009, 1:24 AM
#13
ldonohue avatar

ldonohue

New Zenner

Join Date:
Oct 2008
Location:
Seattle
Posts:
9
Plugin Contributions:
0

Re: trying to change sidebox header w/image

GAH.. I'm having the same exact problem but for the life of me don't understand what I'm supposed to do.. Was thrilled to find this thread, but alas..

I used this tutorial, which worked fine for the Categories (shown as "Shop"):

Then, I went on to change the BOX_HEADING_INFORMATION sidebox header using the same method as tonkali and I'm getting the image name only..

Here's what I've got at the moment --my image just doesn't seem to be referencing correctly even though I'm referencing it (and the image is located in) the exact same way as the Shop header image: my store

-feeling like a brick! can someone help shed some light?

21 Mar 2009, 2:30 AM
#14
ldonohue avatar

ldonohue

New Zenner

Join Date:
Oct 2008
Location:
Seattle
Posts:
9
Plugin Contributions:
0

Re: trying to change sidebox header w/image

okay, neeevermind.. A long walk and glass of wine helped! I was able to add the Image Title mod just fine and WOW, it's easy. thanks!!