Page 1 of 1

Page Title

Posted: Wed Jan 21, 2009 11:56 am
by kastnerd
I was wondering, Dose anyone put there Store name as part of the title of ever page and item?

Like this messageboard puts AbleCommerce in front of every title. I was thinking putting store name at the end of every title.

Re: Page Title

Posted: Wed Jan 21, 2009 12:03 pm
by mazhar
You can try it by changing the page titles through programming. For example create the following method in the App_Code/PageHelper.cs class. Then call it where ever you want to change the title.

Code: Select all

public static string GetTitle(string text) 
    {
        string title = "{0}-{1}";
        return string.Format(title, Token.Instance.Store.Name, text);
    }
For example if you want to change the product details page title the it could be something like

Code: Select all

Page.Title = PageHelper.GetTitle(_Product.Name);