customize generic content list widget layout

Posted by Community Admin on 03-Aug-2018 01:24

customize generic content list widget layout

All Replies

Posted by Community Admin on 31-Dec-2010 00:00

Hi, I tried to customize the generic content list widget by assign a template ascx page to the 'LayoutTemplatePath' property.  I found the default template code from the forum:

<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<telerik:RadListView ID="List" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
    <LayoutTemplate>
        <ul class="sfgenericList">
            <asp:PlaceHolder ID="ItemsContainer" runat="server" />
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li class="sfgenericListItem">
            <h2 class="sfgenericTitle">
                <sf:DetailsViewHyperLink ID="DetailsViewHyperLink1" TextDataField="Title" ToolTipDataField="Description" runat="server" />
            </h2>
            <p class="sfgenericMetaInfo">
                <sf:FieldListView ID="PublicationDate" runat="server" Format="PublicationDate.ToLocal():MMM dd, yyyy" />
                <sf:DetailsViewHyperLink ID="itemCommentsLink" runat="server" CssClass="sfgenericCommentsCount" />
            </p>
        </li>
    </ItemTemplate>
</telerik:RadListView>
<sf:Pager id="pager" runat="server" NavigationMode="Links"></sf:Pager>

It works but now I need to show the content of the item in the list.  I try to implement a collapse/expand feature in the list page.

So how do I pull out the content of each item into the list?

Thanks.

Posted by Community Admin on 31-Dec-2010 00:00

Hi MJia,

You can use jQuery and its show/hide effects.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 03-Jan-2011 00:00

Thanks Ivan but that's not I was asking, I know how to use jquery to make show/hide effects.

I was asking how to retrieve the 'content' of the items in the template ascx page?
I tried to use the following code in the <itemtemplate>:

<sf:FieldListView ID="Content" runat="server" Format=" />

But it doesn't get me anything.

Thanks.

Posted by Community Admin on 03-Jan-2011 00:00

Hi MJia,

Try using an Eval

<asp:Literal ID="Literal4" Text='<%# Eval("Content") %>' runat="server" />


Regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about 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