Hi all,
I normally mod the links.ascx file quite a bit each time there's an update to the links module, but the latest one needs a little more than I can manage in order to get the nowrap option working.
I've pasted my version of the file below. The basics I do are... I remove all the tables, tighten up the spacing, make the dropdown display the go button on the side more often, and I have always added nowrap to the links list by adding ItemStyle-Wrap="false" to the first datalist.
And that's where my problem is. In the latest 03.03.07 release, there is now a setting for adding nowrap to the table cell that surrounds the list. The %# NoWrap % variable presumably inserts either nowrap or nothing. What I need is a way to make it instead return "true" or "false" which is what ItemStyle-Wrap needs.
Does anyone know a convenient way to achieve this? I'm not familiar with compiling source so go easy on me in that regard. If it won't work easily, please take the changes as a suggestion for a future update.
Regards,
Rob
(to try out my changes (so long as the forum hasn't buggered the code up), it pastes straight into links.ascx replacing everything there)
<%@ Control language="vb" Inherits="DotNetNuke.Modules.Links.Links" CodeBehind="Links.ascx.vb" AutoEventWireup="false" Explicit="True" %>
<asp:panel id="pnlList" runat="server">
<asp:DataList id="lstLinks" runat="server" summary="Links Design Table" itemstyle-verticalalign="Top" CellSpacing="0" cellpadding="2" ItemStyle-Wrap="false">
<itemtemplate>
<asp:HyperLink id="editLink" NavigateUrl='<%# EditURL("ItemID",DataBinder.Eval(Container.DataItem,"ItemID")) %>' Visible="<%# IsEditable %>" runat="server">
<asp:Image id="editLinkImage" ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible="<%# IsEditable %>" Runat="server" />
</asp:HyperLink>
<asp:Image ImageUrl="<%# FormatIcon() %>" Visible="<%# DisplayIcon() %>" runat="server" />
<asp:HyperLink CssClass="Normal" Text='<%# DataBinder.Eval(Container.DataItem,"Title") %>' NavigateUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,"Url"),DataBinder.Eval(Container.DataItem,"TrackClicks")) %>' ToolTip='<%# DisplayToolTip(DataBinder.Eval(Container.DataItem,"Description")) %>' Target='<%# IIF(DataBinder.Eval(Container.DataItem,"NewWindow"),"_blank","_self") %>' runat="server" />
<asp:LinkButton Runat="server" CssClass="CommandButton" Text="..." CommandName="Select" Visible="<%# DisplayInfo() %>" />
<asp:Panel id="pnlDescription" visible="false" runat="server">
<asp:Label runat="server" CssClass="Normal" Text='<%# HtmlDecode(DataBinder.Eval(Container.DataItem, "Description")) %>' ID="Label1" />
</asp:Panel>
</itemtemplate>
<ItemStyle VerticalAlign="Top" />
</asp:DataList>
</asp:panel>
<asp:panel id="pnlDropdown" runat="server" Wrap="false">
<asp:imagebutton id=cmdEdit runat="server" imageurl="~/images/edit.gif" alternatetext="Edit" resourcekey="Edit"></asp:imagebutton>
<label style="DISPLAY: none" for="<%=cboLinks.ClientID%>">Link</label>
<asp:dropdownlist id=cboLinks Width="85%" runat="server" datatextfield="Title" datavaluefield="ItemID" cssclass="NormalTextBox"></asp:dropdownlist>
<asp:linkbutton id=cmdGo runat="server" cssclass="CommandButton" resourcekey="cmdGo"></asp:linkbutton>
<asp:linkbutton id=cmdInfo runat="server" cssclass="CommandButton" text="..."></asp:linkbutton>
<asp:label id=lblDescription runat="server" cssclass="Normal"></asp:label>
</asp:panel>