More in this section

Forums / Developing with Sitefinity / Markup for Custom Module

Markup for Custom Module

3 posts, 0 answered
  1. Christian
    Christian avatar
    3 posts
    Registered:
    19 Jan 2012
    14 Feb 2012
    Link to this post
    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
  2. Christian
    Christian avatar
    3 posts
    Registered:
    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">
      <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>
  3. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    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