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 7 of 7

Thread: hide category nav on signin page

  1. #1
    craigh is offline Junior Member
    Join Date
    Jul 2010
    Posts
    3

    Default hide category nav on signin page

    We'd like to hide the vertical category navigation on a wholesale site on the signin and signup pages, I was hoping someone could point me in the right direction to achieve this. It's a version 8 ML installation
    Thanx in advance

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Open your {root}/skins/skin_#/template.cs and comment out these lines:

    Code:
    <div class="navHeader">Browse (!StringResource Name="AppConfig.CategoryPromptPlural"!)</div>
    <div class="leftNav" id="categories">(!XmlPackage Name="rev.categories"!)</div>

  3. #3
    craigh is offline Junior Member
    Join Date
    Jul 2010
    Posts
    3

    Default

    Thanks for the reply

  4. #4
    craigh is offline Junior Member
    Join Date
    Jul 2010
    Posts
    3

    Default

    Sorry if I wasn't a bit clearer with my question. I couldn't find template.cs so I assume you were referring to template.ascx.

    Wouldn't the supplied solution hide the categories on all pages that use the skin?
    as stated we only want to hide it on on the signin and signup pages.

    Would a better approach be testing if a user is logged in or not then showing or hiding the left nav based on that condition? I'm new to aspdnf but would the rev.categories.xml.config in the relevant skin folder be the place to code this conditional dislay for the left nav? or is there a simpler solution

  5. #5
    AspDotNetStorefront Staff - Nicole is offline Administrator
    Join Date
    Jan 2010
    Posts
    41

    Default

    You could put an inline style directly on the createaccount.aspx and signin.aspx pages. So instead of hiding it on all pages, it would only hide on those two pages.
    <style type="text/css">
    #leftNav
    {
    display: none;
    }
    </style>

  6. #6
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    Or I put logic in the source code to switch the menu XML file based on if the user was signed in or not.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  7. #7
    ccmos is offline Junior Member
    Join Date
    Jul 2010
    Posts
    1

    Default v9 Hide Category on Signin Page

    You can hide by changing the template on load time
    use

    void Page_PreInit(object sender, EventArgs e)
    {
    MasterPageFile = "~/app_templates/skin_1/empty2.master";
    }

    into the signin.aspx.cs