Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / CSS over ride on index_default

CSS over ride on index_default

Locked

Views: 4,203

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
27 Oct 2006, 2:15 PM
#1
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

CSS over ride on index_default

So I probably could not find it but, I could use a little help w/ the css over ride.
I am working on a site w/ ZC 1.3.5, and I just cant figure out what to name my over riding .css file. I want to change what is displayed for the index_default, but not what is displayed when I am displaying product categories (index_product_display).
I have called the file, various things but am still having trouble w/ the naming conventions.
any one got any Ideas?

JOsh

27 Oct 2006, 11:48 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: CSS over ride on index_default

You have created a folder and named it...have you copied a template_info.php file to it and edited it to reflect your template name and then activated it in the admin > tools > template Selection...other things to install

See instructions here Create Custom Template

28 Oct 2006, 12:43 PM
#3
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: CSS over ride on index_default

kobra:

You have created a folder and named it...have you copied a template_info.php file to it and edited it to reflect your template name and then activated it in the admin > tools > template Selection...other things to install

See instructions here Create Custom Template
yes I have already created custom template. it is the css over ride naming conventions I need help w/.

JOsh

28 Oct 2006, 1:03 PM
#4
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: CSS over ride on index_default

Josh - it's been my experience that the index is the hardest to use over rides on because a lot of Zen pages use it even though they aren't index pages.

In my case the ony way I got the INDEX ONLY to over write was to force zen to call a second custom template for all pages other than index - there is a thread here on how to edit your init_templates to do so and it works great !

Hope that helps.

28 Oct 2006, 6:01 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: CSS over ride on index_default

As of v1.3.5, you can call it 'index_home.css' and it will only affect the "home" page.

A minor improvement was made in 1.3.6 so that it properly detects home page when manufacturers are selected from pulldown sidebox.

30 Oct 2006, 3:52 PM
#6
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: CSS over ride on index_default

DrByte:

As of v1.3.5, you can call it 'index_home.css' and it will only affect the "home" page.

A minor improvement was made in 1.3.6 so that it properly detects home page when manufacturers are selected from pulldown sidebox.
Umm, I have changed the css name to index_home.css it is still affecting the pages listing the index_product listings.
JOsh

30 Oct 2006, 4:17 PM
#7
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: CSS over ride on index_default

really what I am trying to do is remove the bredacrumbnav from the main page, by setting it to display none.

30 Oct 2006, 6:54 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: CSS over ride on index_default

sanguisdesign:

really what I am trying to do is remove the bredacrumbnav from the main page, by setting it to display none.

To simply remove the breadcrumb from the home page, you could use the stylesheet, or you could simply add another condition in the PHP code of tpl_main_page for your custom template

/includes/templates/YOURTEMPLATE/common/tpl_main_page.php

<!-- bof  breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1') { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->

Change the line with the IF statement to this:

<?php if (DEFINE_BREADCRUMB_STATUS == '1' && !$this_is_home_page) { ?>
30 Oct 2006, 9:45 PM
#9
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: CSS over ride on index_default

DrByte:

To simply remove the breadcrumb from the home page, you could use the stylesheet, or you could simply add another condition in the PHP code of tpl_main_page for your custom template

/includes/templates/YOURTEMPLATE/common/tpl_main_page.php

<!-- bof breadcrumb --> <?php if (DEFINE_BREADCRUMB_STATUS == '1') { ?>
<div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?> <!-- eof breadcrumb -->
> 
> Change the line with the IF statement to this:
> ```
<?php if (DEFINE_BREADCRUMB_STATUS == '1' && !$this_is_home_page) { ?>

I was just hopng to do it w/ styles but I may have to do it this way eh, well I will break and do it the old fassioned way.
JOsh

30 Oct 2006, 10:46 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: CSS over ride on index_default

I just uploaded a new "index_home.css" file to my custom template folder, containing this:```
body {
background-color: orange;
}

#navBreadCrumb {display: none;}

... and it worked fine (the "orange" was to test something else)
The breadcrumb doesn't show on the home page now.
4 Nov 2006, 2:02 PM
#11
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: CSS over ride on index_default

That's a neat solution DrByte - why don't I think of things like that? :D

That one goes in "my" standard ZC upload - one job less to do on a regular basis!