Adding title to my image gallery. - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Adding title to my image gallery.

  • Adding title to my image gallery.
  • I am trying to add a title to the list of thumbnails.

    I tried adding the line:
    <sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Title")%>' />

    To my templeate, as seen in the code bellow
    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <sf:ResourceLinks id="resourcesLinks" runat="server">
        <sf:ResourceFile JavaScriptLibrary="JQuery"/>
    <sf:ResourceLinks id="resourcesLinks2" runat="server" UseEmbeddedThemes="true" Theme="Default">
      <sf:ResourceFile Name="Telerik.Sitefinity.Resources.Themes.Basic.Styles.galleria.classic.css" Static="true" />
    <sf:BrowseAndEditToolbar ID="browseAndEditToolbar" runat="server" Mode="Edit"></sf:BrowseAndEditToolbar>
    <div id="imagesContainer" runat="server" class="sfTmbStripAndImageOnSamePage">
        <telerik:RadListView ID="ItemsList" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
                <asp:PlaceHolder ID="ItemsContainer" runat="server"/> 
              <sf:SitefinityHyperLink  runat="server" id="singleItemLink"/>
              <sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Title")%>' />   
    <sf:Pager id="pager" runat="server"></sf:Pager>
    <asp:PlaceHolder ID=socialContainer runat=server></asp:PlaceHolder>

    But it had no effect.
  • I also have the same question. Did you ever get an answer or figure it out? Thanks!
  • Hello all,

    In order to be able to add content to a widget template you need to place it in a <div> or <span> tag. This way Sitefinity can render the fields properly and also you are free to style them freely if you add a class to the span or div. I managed to bring out the image titles over the thumbnail list as follows:

       <div><sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Title")%>' /> </div>
       <li class="sfimagesTmb">
         <sf:DetailsViewHyperLink ToolTipDataField="Description" ID="singleItemLink" runat="server"/>
    As you can see there is nothing special. I just added the title above the thumbnail. Regards,
    Ivan D. Dimitrov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items