Want to write Product Name on top of page

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Want to write Product Name on top of page

Post by Mike718NY » Wed Dec 17, 2008 12:43 pm

I want to write the Product Name in the StandardHeader.htm when
a Product Page is displayed. For all other pages, I want default text.

I tried this. I does display the Product Name for the Product Pages,
but it is displaying the string "$Product.Name" for all other pages:

#if($Product.Name.Length==0)
"default text" << want displayed for every page except for Product Pages
#else
$Product.Name << displayed only on Product Pages
#end

This is what I want it to do:

#if < for any page other than a Product Page >
"default text"
#else
$Product.Name
#end

Is there a way to do this? thanks

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Want to write Product Name on top of page

Post by nickc » Wed Dec 17, 2008 1:32 pm

Code: Select all

#if ($Product)
$Product.Name
#else
No product here.
#end

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Want to write Product Name on top of page

Post by Mike718NY » Wed Dec 17, 2008 1:57 pm

that worked Nick, thanks!

I'm doing this to have the product name at the very top of the page
for SEO reasons. It is first thing that displays after the <body> tag,
except for all those "<script src="......" tags, which I don't think
the spiders read.

Post Reply