ImageControl Ascx Layout Template.

Posted by Community Admin on 04-Aug-2018 16:30

ImageControl Ascx Layout Template.

All Replies

Posted by Community Admin on 05-Jul-2011 00:00

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.
/Magnus

Posted by Community Admin on 07-Jul-2011 00:00

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.

Regards,
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

This thread is closed