Markup for Custom Module

Posted by Community Admin on 04-Aug-2018 10:55

Markup for Custom Module

All Replies

Posted by Community Admin on 14-Feb-2012 00:00

Hi,

I have a separate built module, where you can upload files.
I have built a custom Template, so I read from the document with this:

<sf:AssetsField runat="server" DataFieldName="Document" />

The Problem is, i need only the Link from the Document.  But how it works?
And is it possible to build my own Markup, can i change this, where can i find it to change it?

<a target="_blank" href="/docs/default-document-library/test.pdf?sfvrsn=0" class="sfpdf" id="ctl15_ctl00_ctl00_dynamicContentListView_ctrl1_ctl01_ctl00_ctl00_documentLink_ctl00_ctl00_documentLink">test</a>

Any Ideas?

Sorry for my bad english...

Thanks

Markus

Posted by Community Admin on 14-Feb-2012 00:00

<%@ Control Language="C#" %>
<%@ Register TagPrefix="sitefinity" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<telerik:radlistview id="dynamicContentListView" runat="server">
  <ItemTemplate>
   <asp:Literal ID="Literal1" Text='<%# Eval("Description") %>' runat="server" />  
 
  <sitefinity:AssetsField runat="server" DataFieldName="Document" />
    <sitefinity:AssetsField runat="server" DataFieldName="Image" />
  </ItemTemplate>
   </telerik:radlistview>
<sitefinity:Pager id="pager" runat="server">
</sitefinity:Pager>
No Ideas?
I need the Documentlink behind the Image.

<a href="DOCUMENTLINK">image</a>

Posted by Community Admin on 16-Feb-2012 00:00

Hi Markus,

 What you see in the template is the AssestsField read mode. If you want to change how it works, you will have to inherit from the AssetsField and change its conditional template for read mode, and then when you register the field in your module, you will have to use the inheriting field control. However, you should be careful not to break any of the bindings.

All the best,
Svetoslav Petsov
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