More in this section
Forums / Developing with Sitefinity / ImageControl Ascx Layout Template.

ImageControl Ascx Layout Template.

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.
2 posts, 0 answered
  1. SungamRammah
    SungamRammah avatar
    10 posts
    24 Jul 2007
    05 Jul 2011
    Link to this post
    Browsing the forum I happened upon a post about the decompile tool. Brilliant! I just decompiled the Resources file, dug out the relevant ascx and i'm off to a good start. I still need to figure out how to access the description field though. But there is a day tomorrow also.

    --- original question --------------------------------------------------------------------------------------------------------------
    Hi. I am evaluating Sitefinity and so far so good. My Editors are clearly in love with the drag drop concept for making attractive ad-hoc page designs. Now to my challenge at hand. While one can arguably do almost everything with a Content block, I would like to extend/adjust the ImageControl's LayoutTemplate. (in this case add a styled Photo Caption from the Images Description field, under the photo)

    My problem being that while I can easily see what fields I have to work with in, lets say a News-template
    (Edit->Single Item Settings->Detail templates-Edit->The code). I can't seem to find a way to get the the same "starting point" as the Template for the ImageControl is an compiled resource.

    I would love to get some pointers.

  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    02 Jan 2018
    07 Jul 2011
    Link to this post
    Hello Sungamrammah,

    Please find below the default template we are using for ImageControl:
    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
    <sf:SfImage id="imageItem" runat="server" />
    <a href="javascript:void(0)" runat="server" id="originalImageLink"></a>
    <sf:BrowseAndEditToolbar ID="browseAndEditToolbar" runat="server" Mode="Edit"></sf:BrowseAndEditToolbar>

    An option for accessing the Description field is by evaluating its content like this:
    <asp:Literal ID="Literal1" runat="server" DisplayMode="Read" Value='<%# Eval("Description")%>' />

    If you have any additional questions, please do not hesitate to let us know.

    Boyan Barnev
    the Telerik team
    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
2 posts, 0 answered