michael.hargreaves-roymorgan
-
2/11/2010 5:45:54 PM
RE:problems creating new web part layout.
Hey Juraj, Thanks for the help, I'm not having much luck though. I'm new to Kentico.
I'm trying to edit the Member Dashboard web part layout, by creating a new layout.
I've provided the layout code below with by change in bold
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MemberDashBoard.ascx.cs" Inherits="CMSWebParts_RoyMorgan_MemberDashboard" %> <%@ Register TagPrefix="cc1" Namespace="CMS.Controls" Assembly="CMS.Controls" %> <asp:PlaceHolder ID="plcNoProductsMessage" runat="server"> <p class="noproductsmsg"> You have not yet purchased any products.</p> </asp:PlaceHolder> <asp:PlaceHolder ID="plcProductList" runat="server"> <cc1:CustomTableDataSource ID="ctdsProductTypes" runat="server" CustomTable="RMR.ProductTypes" /> <div class="result"> <asp:Repeater ID="rptProducts" runat="server" OnItemDataBound="Product_ItemDataBound"> <ItemTemplate> <asp:PlaceHolder ID="plcCurrent" runat="Server" Visible="false"> <div id="content_2" class="entry"> <h2><%# Eval("SKUName")%></h2> <span class="serial">SKU: <%# DataBinder.Eval(Container.DataItem,"SKUNumber")%></span> <div class="desc"> <%# Eval("SKUDescription")%> </div> <div class="productlinks"> <ul> <%# (Eval("RMRFile1") != null && Eval("RMRFile1") != "") ? "<li>" + CMSCustom.GetFileLink(Eval("RMRFile1").ToString(), Eval("SKUID").ToString()) + "</li>" : ""%> <%# (Eval("RMRFile2") != null && Eval("RMRFile2") != "") ? "<li>" + CMSCustom.GetFileLink(Eval("RMRFile2").ToString(), Eval("SKUID").ToString()) + "</li>" : ""%> <%# (Eval("RMRFile3") != null && Eval("RMRFile3") != "") ? "<li>" + CMSCustom.GetFileLink(Eval("RMRFile3").ToString(), Eval("SKUID").ToString()) + "</li>" : ""%> </ul> </div> <div class="lower"> <dl> <dt>Expiry:</dt> <dd> <strong> <%# String.Format("{0:dd-MMM-yyyy}",ValidationHelper.GetDateTime(Eval("OrderItemAccessExpiry"),DateTime.Now))%> </strong> </dd> <dt>Price:</dt> <dd> <strong> <%# EcommerceFunctions.GetFormatedPrice(Eval("SKUPrice")) %> </strong> </dd> </dl> <asp:PlaceHolder ID="plcSubscription" runat="server" Visible="false"> <h4>Subscription</h4> <ul> <asp:PlaceHolder ID="plcSubscriptionEnd" runat="server"> <li>Subscription cancelled date:<asp:Literal ID="litEndDate" runat="server"></asp:Literal></li> <li>Reason:<asp:Literal ID="litEndReason" runat="server"></asp:Literal></li> </asp:PlaceHolder> </ul> <asp:Button ID="btnCancelSubscription" runat="server" OnClick="CancelSubscription" Text="Cancel Subscription" /> <asp:Literal ID="litCancelResult" runat="server"></asp:Literal> </asp:PlaceHolder> </div> </div> </asp:PlaceHolder> <asp:PlaceHolder ID="plcExpired" runat="server" Visible="true"> <div class="entry"> <h2><%# Eval("SKUName")%></h2> <span class="serial"><%# DataBinder.Eval(Container.DataItem,"SKUNumber")%></span> <div class="desc"> <%# Eval("SKUDescription")%> </div>
<div class="lower"> <dl> <dt>Expired:</dt> <dd> <strong> <%# String.Format("{0:dd-MMM-yyyy}",ValidationHelper.GetDateTime(Eval("OrderItemAccessExpiry"),DateTime.Now))%> </strong> </dd> </dl> </div> </div> </asp:PlaceHolder> </ItemTemplate> </asp:Repeater>
</div> </asp:PlaceHolder>
|