Zen Cart Logo

Page Headings

Locked

Views: 854

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
22 May 2009, 9:37 PM
#1
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Page Headings

Hi Guys,

My site: bestpriceaccessories . ie is nearly done. One thing that is bugging me is the heading.

For example on the homepage it is New Products for May. My coder arranged it so that it is generated by Javascript. Its a work around but not a very good one as I have to edit the file for every-page.

<script type="text/javascript">
	document.getElementById("addressBookProcessDefaultHeading").style.display = "none";	
	document.getElementById("title_page").style.display = "block";
	document.getElementById("title_page").innerHTML = document.getElementById("addressBookProcessDefaultHeading").innerHTML ;	
</script>

Thats what I have to edit enter for everypage.

Surely there is a better way to do this?

Thanks,
Daniel

22 May 2009, 9:42 PM
#2
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Re: Page Headings

Ok. I have found the title code is.

So all I need know is the code that gets the page title.. if that makes sense?

22 May 2009, 9:52 PM
#3
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Re: Page Headings

ok.

A work in progress.

If I use <?php echo HEADING_TITLE; ?> It works for the definepages and checkout but doesn't work for categories or products.

For example when on a product I would like it to Have the product name up there.

23 May 2009, 11:55 AM
#4
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Re: Page Headings

OK.

I am getting there.

I worked out where I need to edit.

if ( ($category_depth == 'products') || (zen_check_url_get_terms()) ) {
  // This section deals with product-listing page contents
  define('HEADING_TITLE',  '        xx    ' );

the xx should be the category name. But I am not sure how to edit it for it to echo the category name. Please help! This is the one of the last things I need done in my store!

23 May 2009, 4:02 PM
#5
best_price_accessori avatar

best_price_accessori

Zen Follower

Join Date:
Dec 2008
Posts:
155
Plugin Contributions:
0

Re: Page Headings

Please someone put me out of my misery! Been playing with this all last night and this morning.

define('HEADING_TITLE', " XXX  "); //iphone etc... sub categories.

XXX should be $products_name; but how do I code it?