How to change Page Title Structure?

How to change Page Title Structure. Instead of category::subcategory for every subcategory pages, I want subcategory::category



For product pages : product title::subcategory::category



Does anybody know how can this be done? Moreover, Cs-Cart should fix this for seo purposes.



Why would you want the following in the search engine?

Category::Subcategory::Product Title 1

Category::Subcategory::Product Title 2

Category::Subcategory::Product Title 3



Not really seo and user friendly…



it should be



Product Title 1::Subcategory::Category

Product Title 2::Subcategory::Category

Product Title 3::Subcategory::Category



Better search engine results.



Even Better



Category Page: Category

Sub Category page: Category - Subcategory

Product Pages: Product Title 3 - Subcategory



This an improvement cs-cart needs to make it on its seo functionality. (better customization in page title)

So you want (for category Watches/wind-up/Rolex):

Most expensive watch::wind-up::Rolex::Watches

rather than

Watches::wind-up::Rolex::Most expensive watch



Not sure of the value of this change. But please note, if you don't like how the cart does it automatically, you can do it manually via the admin UI or via a CSV import.

[quote name='tbirnseth' timestamp='1313866000' post='119968']

So you want (for category Watches/wind-up/Rolex):

Most expensive watch::wind-up::Rolex::Watches

rather than

Watches::wind-up::Rolex::Most expensive watch



Not sure of the value of this change. But please note, if you don't like how the cart does it automatically, you can do it manually via the admin UI or via a CSV import.

[/quote]



Your making it look un appealing by having the term “most expensive watch.” Anyway the value in that would be that it makes each page title unique by displaying unique information first.



Oyster Perpetual::Wind-Up::Rolex::Watches = Better Ranking than

Watches :: Rolex :: Wind-Up ::Oyster Perpetual because if you have it this way you'll get in the search engine the following:



Watches :: Rolex :: Wind-Up ::Oyster Perpetual

Watches :: Rolex :: Wind-Up ::Datejust

Watches :: Rolex :: Wind-Up ::President

Watches :: Rolex :: Wind-Up ::Cellini

Watches :: Rolex :: Wind-Up ::Submariner

Watches :: Rolex :: Wind-Up ::Daytona



NOTE: Isn't is it recommended in SEO to place the most important keyword on the page NEAR (As Close) the beginning of the title. Which in this case, is the product's title.

Cause that is what the product page is all about???/



Therefore, it is essential that the structure is reversed or it will look duplicate, especially to the eye of a user. It might not even appear on the search engine correctly if too long as well.



For instance, it could appear like this since there is a word limit in google for the page title:



Watches :: Rolex :: Wind-U…

Unique Description Here…



Watches :: Rolex :: Wind-U…

Unique Description Here…



Watches :: Rolex :: Wind-U…

Unique Description Here…



Watches :: Rolex :: Wind-U…

Unique Description Here…



Now in reverse order (ex:Oyster Perpetual::Wind-Up::Rolex::Watches), the way I'm describing to you would appear like this:



Oyster Perpetual::Wind-Up::Rolex::Watches

Unique Description Here…



Datejust::Wind-Up::Rolex::Watches

Unique Description Here…



President::Wind-Up::Rolex::Watches

Unique Description Here…



Cellini::Wind-Up::Rolex::Watches

Unique Description Here…



Daytona::Wind-Up::Rolex::Watches

Unique Description Here…



Submariner::Wind-Up::Rolex::Watches

Unique Description Here…



And with word limit (If so)…



Oyster Perpetual::Wind-Up::Ro…

Unique Description Here…



Datejust::Wind-Up…

Unique Description Here…



President::Wind-Up::Rol…

Unique Description Here…



Cellini::Wind-Up::Role…

Unique Description Here…



Daytona::Wind-Up::Rolex::Watches

Unique Description Here…



Submariner::Wind-Up::Rolex::Wat…

Unique Description Here…



With the second method, you'll achieve better rankings in the search engine, and appear better in the search engines eyes as well as the users. It is a win-win situation. Uniqueness must appear near the beginning.


[quote name='tbirnseth' timestamp='1313866000' post='119968']

So you want (for category Watches/wind-up/Rolex):

Most expensive watch::wind-up::Rolex::Watches

rather than

Watches::wind-up::Rolex::Most expensive watch



Not sure of the value of this change. But please note, if you don't like how the cart does it automatically, you can do it manually via the admin UI or via a CSV import.

[/quote]



Do you know how I would go about doing this? This is not manual work in admin ui or csv import. I just need to change how cs-cart auto generates its page structure. Do you know where I can go to change coding? I have a feeling its in the index.tpl. But not sure how to change.

You might take a look at core/fn.common.php at the function fn_generate_meta_description().

However, it is called from a variety of different places and so the data that it works from can be quite variable.

I'm not sure where (or if) the page title is auto generated. But meta_description definitely is if it is not set. Not sure about keywords.



I am by no means an SEO wizard. What you state about most important first makes sense but I do not know the algorithms that Google or others use.

[font=“Verdana”]Find the smarty variables that call the information for the META tags and TITLE info, and simply do a “Find In Files” with Notepad++ for example. :)



It’s a great idea - I’ve always thought it appeared convoluted…[/font]

I understand Ludovic's question perfectly, and it's how I came to this post after searching for suggestions.



Has anyone managed to find where the page title structure is defined in the code? and if so, how to structure them in the manner described?



Thanks in advance for any help.

[quote name='lucianofuentes' timestamp='1322493505' post='126846']

I understand Ludovic's question perfectly, and it's how I came to this post after searching for suggestions.



Has anyone managed to find where the page title structure is defined in the code? and if so, how to structure them in the manner described?



Thanks in advance for any help.

[/quote]



Why not just use 1Clue.com's free add-on for dynamic page titles

http://1clue.com/dynamic-page-titles.html.

1clues add-on is only useful for Product pages. I also like it when my Category pages have inverted page titles. So, I tried to piece something together that would work in the newest version of Cs-cart and it's working for me. I'm not sure if this is good coding, but it works for me.



Note: I have version 2.2.3 , if you have OLDER version, you might want to see this post: Reverse page title order - v1.x SEO - CS-Cart Community Forums



If you have a newer version of cs-cart, try this:



1. OPEN index.tpl file…



2. FIND


```php

{if $page_title}

{$page_title|escape:“html”}

{else}

{foreach from=$breadcrumbs item=i name=“bkt”}

{if !$smarty.foreach.bkt.first}{$i.title|unescape|strip_tags|escape:“html”}{if !$smarty.foreach.bkt.last} :: {/if}{/if}

{/foreach}

{if !$skip_page_title}{if $breadcrumbs|count > 1} - {/if}{$location_data.page_title|escape:“html”}{/if}

{/if}

```

[b]3.[/b] REPLACE WITH
```php
{if $page_title}
{$page_title|escape:"html"}
{else}
{section name=bkt loop=$breadcrumbs step=-1}
{if !$smarty.section.bkt.last}{$breadcrumbs[bkt].title|escape}{if !$smarty.section.bkt.last} - {/if}{/if}
{/section}
{$location_data.page_title|escape:"html"}
{/if}
```

[quote name='solesurvivor' timestamp='1322508429' post='126866']

Why not just use 1Clue.com's free add-on for dynamic page titles

http://1clue.com/dynamic-page-titles.html.

[/quote]



Great question! I just had a look at it and it does exactly what I need. Thanks!