Assign unique aspx file for home page?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
jcw2m
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Sep 07, 2012 9:51 am

Assign unique aspx file for home page?

Post by jcw2m » Tue Oct 16, 2012 3:26 pm

Hi,

I created and applied a layout for webpages using a layout master file with webpage.aspx and webpage.aspx.cs. I need the home page to use a unique layout. It is using the actual layout file created for it, but since it falls under web pages it is also using webpage.aspx and webpage.aspx.cs. I need it to use a different set.

Question: How can I make only the home page use a unique webpage.aspx and webpage.aspx.cs to be created for it? Or, is there a different/better approach to accomplish this?

Thanks!
Julie

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Assign unique aspx file for home page?

Post by Logan Rhodehamel » Tue Oct 16, 2012 6:40 pm

Does this mean that webpage.aspx and webpage.aspx.cs have been customized so that this file isn't using a dynamic master page anymore? Because normally you could go into the webpages menu in AbleCommerce, find the homepage, and then set the layout to your custom one. But from the post it seems like webpages has been fixed to use a certain layout. Is that the case?
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

jcw2m
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Sep 07, 2012 9:51 am

Re: Assign unique aspx file for home page?

Post by jcw2m » Wed Oct 17, 2012 9:15 am

It was... I think I have something working in place now (still testing). It did require editing webpage.aspx by removing classes so it only contains:

Code: Select all

<%@ Page Title="View Webpage" Language="C#" MasterPageFile="~/Layouts/LeftSidebar.Master" AutoEventWireup="True" CodeFile="Webpage.aspx.cs" Inherits="AbleCommerce.WebpagePage" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="PageContent" Runat="Server">
    <div class="mainContentWrapper">
        <cb:HtmlContainer ID="PageContents" runat="server"></cb:HtmlContainer>
    </div>
</asp:Content>
Then pull needed classes into the layout master created for specific pages:

Code: Select all

<%-- This file is a generated file. Do not modify. See customization guide for details. --%>
<%@ Master Language="C#" AutoEventWireup="true" MasterPageFile="~/Layouts/Base.Master" Inherits="AbleCommerce.Layouts.Base" %>
<%--
<layout>
<description>Default layout for webpages.</description>
</layout>
--%>
<%@ Register src="~/ConLib/UserPoints.ascx" tagname="UserPoints" tagprefix="uc" %>
<%@ Register src="~/ConLib/StoreHeader.ascx" tagname="StoreHeader" tagprefix="uc" %>
<%@ Register src="~/ConLib/RecentlyViewed.ascx" tagname="RecentlyViewed" tagprefix="uc" %>
<%@ Register src="~/ConLib/PopularProductsDialog.ascx" tagname="PopularProductsDialog" tagprefix="uc" %>
<%@ Register src="~/ConLib/SimpleCategoryList.ascx" tagname="SimpleCategoryList" tagprefix="uc" %>
<%@ Register src="~/ConLib/SocialMediaLinksDialog.ascx" tagname="SocialMediaLinksDialog" tagprefix="uc" %>
<%@ Register src="~/ConLib/StoreFooter.ascx" tagname="StoreFooter" tagprefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="NestedMaster" runat="server">
    <div id="header">
        <div class="zone">
            <div class="section">
                <div class="content">
                    <asp:ContentPlaceHolder ID="PageHeader" runat="server">
                        <uc:StoreHeader ID="StoreHeader_H" runat="server" />
                    </asp:ContentPlaceHolder>
                </div>
            </div>
        </div>
    </div>
<div class="mainColTopBlueBar">&nbsp;</div>
<div class="w2mInnerWidth">
    <div id="leftColumn">
        <div class="zone">
		 <asp:ContentPlaceHolder ID="LeftSidebar" runat="server">
			   <uc:UserPoints ID="UserPoints" runat="server" />
			   <uc:RecentlyViewed ID="RecentlyViewedLeft" runat="server" />
                <uc:SimpleCategoryList ID="SimpleCategoryListLeft" runat="server" />
                <uc:SocialMediaLinksDialog ID="SocialMediaLinksDialogLeft" runat="server" />
                <uc:PopularProductsDialog ID="PopularProductsDialogLeft" runat="server" />
            </asp:ContentPlaceHolder>
          </div>
    </div>
    <div id="mainColumn" class="leftSidebarLayout" style="background-color:transparent;">
        <div class="zone">
		[color=#BF0000]<div id="webpagePage">[/color]
		<div class="webpagePageInnerPadding">
            <asp:ContentPlaceHolder ID="PageContent" runat="server">
                [page body]
            </asp:ContentPlaceHolder>
        </div>
		</div>
		</div>
    </div>
	</div>
    <div id="footer">
        <div class="zone">
            <div class="section">
                <div class="content">
                    <asp:ContentPlaceHolder ID="PageFooter" runat="server">
                        <uc:StoreFooter ID="StoreFooter_F" runat="server" />
                    </asp:ContentPlaceHolder>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
Getting there slowly but surely. Thanks for responding. :)

Post Reply