Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Hiding page header (title) when cPath=0

Hiding page header (title) when cPath=0

Locked

Views: 1,153

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
17 Oct 2009, 4:09 AM
#1
avantik avatar

avantik

New Zenner

Join Date:
Mar 2009
Location:
Miami - USA
Posts:
33
Plugin Contributions:
0

Hiding page header (title) when cPath=0

Hi zenners,
I'm sure this is an easy one..but just can't find it.
What is the file that needs to be edited to insert an "if" statement to hide/change the title when the cPath=0?

In the screenshot attached you'll see what I'm trying to do
Thanks!!!

17 Oct 2009, 4:31 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hiding page header (title) when cPath=0

To hide the breadcrumb on this home page, you can use your templates and overrides and copy the file:
/includes/templates/template_default/common/tpl_main_page.php

to your custom directory:
/includes/templates/your_template_dir/common/tpl_main_page.php

and change the code to read:

<!-- bof  breadcrumb -->
<?php if (!$this_is_home_page && DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
17 Oct 2009, 12:07 PM
#3
avantik avatar

avantik

New Zenner

Join Date:
Mar 2009
Location:
Miami - USA
Posts:
33
Plugin Contributions:
0

Re: Hiding page header (title) when cPath=0

Hi Linda,
Thanks for your quick reply!
I'm not trying to change the breadcrumb. I'm trying to change the title of what's below the breadcrumb (I think it's the page title itself, where it changes based on the category you're in)
Would your suggestion work for that as well?

:blink:

17 Oct 2009, 3:27 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Hiding page header (title) when cPath=0

Look at the template file tpl_index_categories.php and you will see where it is echoing the end of the breadcrumb for the display:

<h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1>

You can control that with something like:

<h1 id="indexCategoriesHeading"><?php echo ($_GET['cPath'] == 0 ? '' : $breadcrumb->last()); ?></h1>

NOTE: be sure to use your templates and overrides for this ...

18 Oct 2009, 3:31 AM
#5
avantik avatar

avantik

New Zenner

Join Date:
Mar 2009
Location:
Miami - USA
Posts:
33
Plugin Contributions:
0

Re: Hiding page header (title) when cPath=0

Hi Linda,
It worked! Thanks!
:clap: