In repeater RadTabStrip with Custom Module's itemlist

Posted by Community Admin on 04-Aug-2018 19:28

In repeater RadTabStrip with Custom Module's itemlist

All Replies

Posted by Community Admin on 15-Nov-2017 00:00

Hi,

I'm kinda new in Sitefinity, and I created Custom module which has Title, filename and year. It is kinda download module. Module works fine. But I want to create tabs labeled by Years (Generated dynamically) and every active tab (year) should have published item list which has that year in "year" value.

Here is my custom module template:

<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" 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" %>
<%@ Import Namespace="Telerik.Sitefinity.Web.UI" %>
<sf:SitefinityLabel id="title" runat="server" WrapperTagName="div" HideIfNoText="true" HideIfNoTextMode="Server" CssClass="sfitemFieldLbl" />
<telerik:RadListView ID="dynamicContentListView" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
    <LayoutTemplate>
        <ul class="sfitemsList sfitemsListTitleDateTmb sflist">
            <asp:PlaceHolder ID="ItemsContainer" runat="server" />
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li class="sfitem sflistitem sfClearfix"  data-sf-provider='<%# Eval("Provider.Name")%>' data-sf-id='<%# Eval("Id")%>' data-sf-type="Telerik.Sitefinity.DynamicModules.Model.DynamicContent">
          <sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("GovernmentDate")%>' />
            <h2 class="sfitemTitle sftitle">
                <sf:DetailsViewHyperLink ID="DetailsViewHyperLink" TextDataField="Title" runat="server" data-sf-field="Title" data-sf-ftype="ShortText" />
            </h2>
            <sf:FieldListView ID="PublicationDate" runat="server" Format="PublicationDate.ToLocal():MMM d, yyyy, HH:mm tt" WrapperTagName="div" WrapperTagCssClass="sfitemPublicationDate" />
        </li>
    </ItemTemplate>
</telerik:RadListView>
<sf:Pager id="pager" runat="server"></sf:Pager>
<asp:PlaceHolder ID="socialOptionsContainer" runat="server"></asp:PlaceHolder>

This is auto created template.

And this value should be used to list items in tabs

 <sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("GovernmentDate")%>' />

And I have attached picture how it should look/work in the end.

Thanks in advance

Posted by Community Admin on 15-Nov-2017 00:00

What version of Sitefinity? Where does 'Years' come from? Is it a tag or classification or just a text field? You might also consider use hierarchy within the module Create 'Year' and have the 'downloads' as a child type.  

You could also just use the documents/files module and add tags for years

Have you looked into using MVC instead? I would recommend checking out Feather (docs.sitefinity.com/feather).  Also since you used module builder if you are on 10.1/2 you can use the Odata web services (docs.sitefinity.com/for-developers-client-side-programming-and-web-services) then use the built in frontend framework Kendo UI (docs.sitefinity.com/for-developers-access-kendo-libraries-that-are-shipped-with-sitefinity)

Posted by Community Admin on 16-Nov-2017 00:00

Hi,

Thank you for your reply,

I'm using 8.1 standard edition. Years come from text frield. Well if classification works what I need I can create classification in years and add items in it. So how can I create repeater Tabs with Classificiations and Items in it?

Posted by Community Admin on 18-Nov-2017 00:00

Hi Jonathan, 

Couldn't do it with feather so thought file and tag version is easiest version to do so I'm trying to do with tag and document/file module but no luck. Can you help me with some examples please?

Posted by Community Admin on 21-Nov-2017 00:00

Here is a simple ASPX page that searches documents by the tag you input in the Textbox. You can place this in the Sitefinity project to test then use/move the Method FindDocsByTagName('TagName') to where you need it.

 

https://gist.github.com/jonathanread/b7590f2cdbbf5717d695f2f545fb33ed 

This thread is closed