More in this section
Forums / Designing & Styling / Adding title to my image gallery.

Adding title to my image gallery.

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Andrew
    Andrew avatar
    202 posts
    05 Jun 2009
    08 May 2012
    Link to this post
    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.
  2. Tyler
    Tyler avatar
    9 posts
    10 Jul 2012
    13 Sep 2013
    Link to this post
    I also have the same question. Did you ever get an answer or figure it out? Thanks!
  3. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    26 Mar 2015
    18 Sep 2013
    Link to this post
    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
3 posts, 0 answered