More in this section
Forums / Developing with Sitefinity / Markup for Custom Module

Markup for Custom Module

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. Christian
    Christian avatar
    3 posts
    19 Jan 2012
    14 Feb 2012
    Link to this post

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


  2. Christian
    Christian avatar
    3 posts
    19 Jan 2012
    14 Feb 2012
    Link to this post
    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="sitefinity" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <telerik:radlistview id="dynamicContentListView" runat="server">
       <asp:Literal ID="Literal1" Text='<%# Eval("Description") %>' runat="server" />  
      <sitefinity:AssetsField runat="server" DataFieldName="Document" />
        <sitefinity:AssetsField runat="server" DataFieldName="Image" />
    <sitefinity:Pager id="pager" runat="server">
    No Ideas?
    I need the Documentlink behind the Image.

    <a href="DOCUMENTLINK">image</a>
  3. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    24 Sep 2012
    16 Feb 2012
    Link to this post
    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
3 posts, 0 answered