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

Thread: Adding content pages

  1. #1
    myalo is offline Junior Member
    Join Date
    May 2006
    Posts
    13

    Default Adding content pages

    Version ML 9.0.1.1/9.0.1.1
    I would like to add pages with content - no products just my own content. For example an article about our store - article.aspx?
    What are my options?
    So far I tried:
    Create my own simple master page and an aspx page based on that. If I leave Inherits="AspDotNetStorefront.MasterPageBase" in the page directive like in the template.master, the aspx page fails on this line
    return (this.Page as SkinBase).RequireScriptManager;
    in Web\App_Code\MasterPageBase.cs Line: 212 so I guess there is much to be done if I want to have the same functionality as in template.master. If I take this line out it works but then references to images such as the menu tab-sep.gif is wrong and to move the gif to the skin area, also the reference to the css file did not happen as explained in pdf guide and I had to uncomment the <link ... as I assume that the base class does some changes to the path.
    So what are my options? Is there a document that explain what I need to include in an aspx that is uses template.master and what is the minimum that needs to be in code behind to take advantage of the masterbase?
    Should I just forget about it and continue with my simpler master and pages based on it and loose probably some of the features applied in the initial sample pages?
    Other options?
    Thanks
    -----------------------
    Here is the top part of the master I am testing with
    <%@ Master Language="C#" AutoEventWireup="true" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <%@ Register TagPrefix="aspdnsfc" Namespace="AspDotNetStorefrontControls" Assembly="AspDotNetStorefrontControls" %>
    <%@ Import Namespace="AspDotNetStorefrontCore" %>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">

    <%-- compatibility mode with ie8 to prevent the aspnet menu to render blank dropdowns --%>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <%-- Leave the title empty, it will get populated at runtime --%>
    <title></title>

    <%-- Leave the description and keyword content empty, it will get populated at runtime --%>
    <meta name="description" content="">
    <meta name="keywords" content="">

    <%-- The skin ref will base on the current theme applied so we don't need to declare here which css file to use --%>
    <link runat="server" rel="stylesheet" href="~/App_Themes/skin_1/style.css" type="text/css">

    <script type="text/javascript" src="jscripts/core.js"></script>

    <asp:Literal ID="ltrBuySafeJsURL" runat="server" Text='<%$ Tokens:BuySafeJsUrl %>' />

    </head>
    <body>

    <form id="form1" runat="server">

    <asp:Literal ID="ltrPageInfo" runat="server" Text='<%$ Tokens:PageInfo %>' />
    <div id="login">
    <span id="userName"><asp:Literal ID="ltrUserName" runat="server" Text='<%$ Tokens:UserName %>' /></span><span id="loginText"><a href='<asp:Literal ID="Literal1" runat="server" Text="<%$ Tokens:SignInOut_Link %>" />'><asp:Literal ID="ltrSignInOutText" runat="server" Text='<%$ Tokens:SignInOut_Text %>' /></a></span>
    </div>
    ...
    ------------------------
    Here is the simple aspx using the master
    <%@ Page Language="c#" MasterPageFile="~/App_Templates/Skin_1/aju.master" %>
    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="PageContent">
    <asp:Panel ID="pnlContent" runat="server" >
    This and that
    </asp:Panel>
    </asp:Content>

  2. #2
    mbertulli is offline Senior Member
    Join Date
    Aug 2008
    Posts
    243

    Default

    <% if (RequireScriptManager)
    { %>
    <%-- Only render for pages that require ajax --%>
    <asp:ScriptManager ID="scrptMgr" runat="server">
    </asp:ScriptManager>
    <% } %>
    Did you remove that from the masterpage? If you did, try re-adding it.
    Matthew Bertulli
    Demac Media
    mbertulli@demacmedia.com
    Custom Web Design & E-Commerce Development
    AspDotNetStoreFront Platinum DevNet Partner
    ----

    Custom Skinning & Design
    Web Services Integration
    Custom Reporting
    Salesforce.com eCommerce AspDotNetStoreFront Integration

  3. #3
    Mike The Last Boyscout is offline User
    Join Date
    Nov 2008
    Posts
    254

    Default

    Couldn't you just use topic pages instead?

  4. #4
    mbertulli is offline Senior Member
    Join Date
    Aug 2008
    Posts
    243

    Default

    Topic pages would work beautifully if you are needed static (no functionality) content pages.

    The beauty of master pages is that developers can now add totally new, custom functionality, .aspx pages to ASPDNSF (theoretically).
    Matthew Bertulli
    Demac Media
    mbertulli@demacmedia.com
    Custom Web Design & E-Commerce Development
    AspDotNetStoreFront Platinum DevNet Partner
    ----

    Custom Skinning & Design
    Web Services Integration
    Custom Reporting
    Salesforce.com eCommerce AspDotNetStoreFront Integration

  5. #5
    myalo is offline Junior Member
    Join Date
    May 2006
    Posts
    13

    Default

    Quote Originally Posted by mbertulli View Post
    Did you remove that from the masterpage? If you did, try re-adding it.
    No I did not. I tried with and without but same error.
    Thanks

  6. #6
    myalo is offline Junior Member
    Join Date
    May 2006
    Posts
    13

    Default

    Quote Originally Posted by mbertulli View Post
    Topic pages would work beautifully if you are needed static (no functionality) content pages.

    The beauty of master pages is that developers can now add totally new, custom functionality, .aspx pages to ASPDNSF (theoretically).
    I am using master pages in website I develop and they are great.
    What I am missing is documentation or more information on how the they work with ASPDNSF.
    Is there any documentation available other the manual and short guide in a pdf format found in the sub dir of the install?
    I read here about t2- and about topics not found in the database which cause the application to look for an HTML file. Where can I find all this information?
    Thanks

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

    Default

    In testing I ran in to this same problem. The solution is in the code behind file. Make sure the Partial Class Inherits SkinBase instead of System.Web.UI.Page. You'll also have to specify the correct namespace. When you change the namespace remeber to change the Inherits part of the aspx page.

    Code:
    Partial Class Default2
        Inherits System.Web.UI.Page
    
    End Class
    becomes:

    Code:
    Namespace AspDotNetStorefront
    
        Partial Public Class Default2
            Inherits SkinBase
    
        End Class
    End Namespace
    and on the aspx page...

    Code:
    <%@ Page Title="" Language="VB" MasterPageFile="~/App_Templates/Skin_1/template.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
    becomes:

    Code:
    <%@ Page Title="" Language="VB" MasterPageFile="~/App_Templates/Skin_1/template.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="AspDotNetStorefront.Default2" %>
    Last edited by cjbarth; 05-11-2010 at 09:15 AM.

  8. #8
    psharma is offline Junior Member
    Join Date
    Jun 2010
    Posts
    18

    Default

    Did you find a solution that worked? or some manual or something to find about the integration of your site with ASPDNSF