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: Need separate default.aspx page for each skin

  1. #1
    JoelWZ is offline Junior Member
    Join Date
    Mar 2011
    Posts
    25

    Question Need separate default.aspx page for each skin

    I am in a situation where I need a different default.aspx page for each skin. I thought about creating an entry default.aspx and determining the current skin, redirecting to the skin's default.aspx. However, I can't figure out how to determine programmatically (in the code-behind) what the current skin id is.

    Has anyone done this, or can someone point me in the right direction to do this, please?

    Thanks in advance...

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    If it's just the content area on default.aspx that you need to change, that's pretty easy. Default.aspx's content area is created by the output of the page.default.xml.config XML package. You can either modify default.aspx to use a different XML package based on the skin, or (easier) modify the XML package to output different contents based on the skin.

    If you need to vary the entire page (nav, header/footer, etc) then the easiest thing is going to be to make separate skins for each store if you haven't yet, and then set up store-specific templates for the default.aspx page.

  3. #3
    JoelWZ is offline Junior Member
    Join Date
    Mar 2011
    Posts
    25

    Default

    We have skins set up for each area, but how do we direct the application flow to hit the default.aspx in the skin folder, or is that what you are talking about when you say template a default.aspx?

  4. #4
    JoelWZ is offline Junior Member
    Join Date
    Mar 2011
    Posts
    25

    Default

    More information. We are adding some controls to the master pages that are accessed from the children. We are using:
    <%@ MasterType VirtualPath="~/App_Templates/Skin_2/template.Master" %>

    to allow us to get to those controls, eg. Master.lblInfo. If the skin gets changed, the access of Master.lblInfo gets a casting error on Master "trying to cast type skin_2.TemplateMaster to type skin_3.templateMaster". I think the VirtualPath is causing the casting issue. My thought was if you could create separate default page per skin, we could solve that problem.