Including Category Name in Title tag on Product Details Page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Including Category Name in Title tag on Product Details Page

Gaurav kalia
Hi All

Right now on product details page title tag comes with store name and
product name.

Store Name | Product Name

<title>${(productStore.storeName)?if_exists} | <#if
categoryName?has_content>${categoryName}</#if> <#if title?has_content>
${title}<#elseif
titleProperty?has_content>${uiLabelMap.get(titleProperty)}</#if></title>

But on the category details page it comes with the store name and
category name.

Store Name | Category Name

My requirement is to add category name as well on the product details
page so it will look like below:

Store Name | Category Name | Product Name

Please suggest how can I achieve this.

Thanks

Gaurav
Reply | Threaded
Open this post in threaded view
|

Re: Including Category Name in Title tag on Product Details Page

Gaurav kalia
any suggestion ?

On Tuesday 24 August 2010 05:06 PM, Gaurav Kalia wrote:

> Hi All
>
> Right now on product details page title tag comes with store name and
> product name.
>
> Store Name | Product Name
>
> <title>${(productStore.storeName)?if_exists} | <#if
> categoryName?has_content>${categoryName}</#if> <#if title?has_content>
> ${title}<#elseif
> titleProperty?has_content>${uiLabelMap.get(titleProperty)}</#if></title>
>
> But on the category details page it comes with the store name and
> category name.
>
> Store Name | Category Name
>
> My requirement is to add category name as well on the product details
> page so it will look like below:
>
> Store Name | Category Name | Product Name
>
> Please suggest how can I achieve this.
>
> Thanks
>
> Gaurav

Reply | Threaded
Open this post in threaded view
|

Re: Including Category Name in Title tag on Product Details Page

James McGill-5
In reply to this post by Gaurav kalia
On Tue, Aug 24, 2010 at 4:36 AM, Gaurav Kalia
<[hidden email]>wrote:

> Hi All
>
> Right now on product details page title tag comes with store name and
> product name.
>
> Store Name | Product Name
>


I'm not sure what page you're referring to, but I think you're going to have
to make a View Entity to join store(s) to product(s) to categor(ies) .
Probably the view
ProductCategoryAndMember will be helpful here.

Since the Store/Catalog/Category/Product coupling is pretty loose, I also
think there is a problem with multiplicity with what you want to show.

To get the result you want, you might have to make a view to join
ProdCatalogCategory, ProductStoreCatalog, and ProductCategoryMember, and
then select on that for the product(s) and store(s) you want.

Probably there is a Groovy action before your page is rendered where you
could do this query and put it into a map that the FTL can see.

There might be an easier way, but this is one way I'd handle it.  What page
are you looking at exactly?

--
James McGill
Phoenix AZ
Reply | Threaded
Open this post in threaded view
|

Re: Including Category Name in Title tag on Product Details Page

Scott Gray-2
In reply to this post by Gaurav kalia
You could probably borrow some code from the bread crumb trail screenlet for this.  At the very least it will give you an idea of the correct way to get the category that the product was navigated from.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 25/08/2010, at 3:16 AM, Gaurav Kalia wrote:

> any suggestion ?
>
> On Tuesday 24 August 2010 05:06 PM, Gaurav Kalia wrote:
>> Hi All
>>
>> Right now on product details page title tag comes with store name and product name.
>>
>> Store Name | Product Name
>>
>> <title>${(productStore.storeName)?if_exists} | <#if categoryName?has_content>${categoryName}</#if> <#if title?has_content> ${title}<#elseif titleProperty?has_content>${uiLabelMap.get(titleProperty)}</#if></title>
>>
>> But on the category details page it comes with the store name and category name.
>>
>> Store Name | Category Name
>>
>> My requirement is to add category name as well on the product details page so it will look like below:
>>
>> Store Name | Category Name | Product Name
>>
>> Please suggest how can I achieve this.
>>
>> Thanks
>>
>> Gaurav
>


smime.p7s (3K) Download Attachment