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
Assign unique aspx file for home page?
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Assign unique aspx file for home page?
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
.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.
Logan
.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.
Re: Assign unique aspx file for home page?
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:
Then pull needed classes into the layout master created for specific pages:
Getting there slowly but surely. Thanks for responding.
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>
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"> </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>