Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: custom extension doesn't work in mobile

  1. #1
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default custom extension doesn't work in mobile

    I have the following code that works great on the normal site. Once I switch to mobile, it doesn't return anything as SectionTitle. Any suggestions?

    Code:
    public string GetSectionTitle()
        {
            string SectionTitle = string.Empty;
            try
            {
                Page p = HttpContext.Current.Handler as Page;
                SectionTitle = (p as SkinBase).SectionTitle;
            }
            catch { }
            return SectionTitle;
    }

  2. #2
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    Any suggestions?

  3. #3
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Which page are you having problems on (e.g. Product page, Category page etc.). The SectionTitle is a SkinBase variable but is only set within the individual pages and it's possible that one of the mobile templates is clearing it, or that it's not being set correctly?

  4. #4
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    This is not working on Product and Category pages. It works fine when the site is non-mobile. I have taken all references to anything mobile out of the category.aspx and .aspx.cs pages, yet I still get nothing when requesting sectiontitle.