Posted in: Comments

The indentation got lost somewhere in the newer versions of EPiServer. In older versions and in EPiServer 6 there is a spacer-gif (hello 1999). To fix it (not in a nice way) in EPiServer 5.2.375.236 just replace all the markup in /UI/Admin/Categories.aspx with this:

<%@ Page Language="c#" CodeBehind="Categories.aspx.cs" AutoEventWireup="False" Inherits="EPiServer.UI.Admin.Categories" MasterPageFile="../MasterPages/EPiServerUI.Master" Title="Edit Categories" %>

<asp:Content ContentPlaceHolderID="MainRegion" runat="server">
	<p><episerverui:toolbutton id="AddRootCategory" onclick="InsertRootCategory" skinid="Add" text="<%$ Resources: EPiServer, button.add %>" tooltip="<%$ Resources: EPiServer, button.add %>" runat="server" /></p>
	<asp:DataGrid ID="Grid" runat="server" AutoGenerateColumns="false" OnPreRender="PreRendering" OnDataBinding="SetHeaders" OnEditCommand="Edit_Clicked" OnCancelCommand="CancelEditing" OnUpdateCommand="Save_Click" OnDeleteCommand="DeleteCategory" OnItemCommand="HandleButtons">
		<Columns>
			<asp:TemplateColumn>
				<HeaderStyle CssClass="epitableheading" />
				<ItemStyle CssClass="nowrap" />
				<ItemTemplate>
					<span style="padding-left: <%#(((int)DataBinder.Eval(Container.DataItem, "Indent"))*15)%>px;"></span>
					<%# HttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Name").ToString()) %>
				</ItemTemplate>
				<EditItemTemplate>
					<span style="padding-left: <%#(((int)DataBinder.Eval(Container.DataItem, "Indent"))*15)%>px;"></span>
					<asp:TextBox ID="CategoryName" CssClass="EP-requiredField" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Name")%>'></asp:TextBox>&nbsp;
					<asp:RequiredFieldValidator ID="CategoryNameValidator" runat="server" ControlToValidate="CategoryName" Text="*" />
					<asp:CustomValidator ID="UniqueNameValidator" runat="server" ControlToValidate="CategoryName" OnServerValidate="UniqueNameValidator_Validate" Text="*" />
				</EditItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<HeaderStyle Width="300" CssClass="epitableheading" />
				<ItemStyle Width="300" CssClass="nowrap" />
				<ItemTemplate>
					<span style="padding-left: <%#(((int)DataBinder.Eval(Container.DataItem, "Indent"))*15)%>px;"></span>
					<%# HttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Description").ToString()) %>
				</ItemTemplate>
				<EditItemTemplate>
					<span style="padding-left: <%#(((int)DataBinder.Eval(Container.DataItem, "Indent"))*15)%>px;"></span>
					<asp:TextBox Columns="60" CssClass="EP-requiredField" ID="CategoryDescription" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "Description")%>'></asp:TextBox>&nbsp;
					<asp:RequiredFieldValidator ID="CategoryDescriptionValidator" runat="server" ControlToValidate="CategoryDescription" Text="*" />
				</EditItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<HeaderStyle CssClass="epitableheading" />
				<ItemTemplate>
					<%#(bool)DataBinder.Eval(Container.DataItem, "Available") ? "<img src='" + this.GetImageThemeUrl("Tools/CheckBoxOn.gif") + "' alt='" + EPiServer.Core.LanguageManager.Instance.Translate("/admin/categories/tablevisible") + "'>" : "<img src='" + this.GetImageThemeUrl("Tools/CheckBoxOff.gif") + "' alt='" + EPiServer.Core.LanguageManager.Instance.Translate("/admin/categories/notvisible") + "'>"%>
				</ItemTemplate>
				<EditItemTemplate>
					<asp:CheckBox runat="server" Checked='<%#(bool)DataBinder.Eval(Container.DataItem, "Available") ? true : false%>' />
				</EditItemTemplate>
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<HeaderStyle CssClass="epitableheading" />
				<ItemTemplate>
					<%#(bool)DataBinder.Eval(Container.DataItem, "Selectable") ? "<img src='" + this.GetImageThemeUrl("Tools/CheckBoxOn.gif") + "' alt='" + EPiServer.Core.LanguageManager.Instance.Translate("/admin/categories/tableselectable") + "'>" : "<img src='" + this.GetImageThemeUrl("Tools/CheckBoxOff.gif") + "' alt='" + EPiServer.Core.LanguageManager.Instance.Translate("/admin/categories/notselectable") + "'>"%>
				</ItemTemplate>
				<EditItemTemplate>
					<asp:CheckBox runat="server" Checked='<%#(bool)DataBinder.Eval(Container.DataItem, "Selectable") ? true : false%>' />
				</EditItemTemplate>
			</asp:TemplateColumn>
		</Columns>
	</asp:DataGrid>
	<br />
</asp:Content>