+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Module Backend Views

Module Backend Views

5 posts, 0 answered
  1. Kristian
    Kristian avatar
    214 posts
    Registered:
    03 Jun 2010
    11 Aug 2011
    Link to this post
    Is it possible to push out any of the backend templates to be viewed by front end users.

    For example Products module has revision history, Can I let a front user view this somehow?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    12 Aug 2011
    Link to this post
    Hi Kristian,


    This is not supported. You will need to use a custom widget, say RadGrid or wrapper of the RadEditor which supports version comparison and bind the data by calling Telerik.Sitefinity.Versioning.VersionManager methods. There is a service

    /Sitefinity/Services/Versioning/HistoryService.svc

    that you can use to bind a RadGrid instance


    sample

    <telerik:RadGrid id="historyGrid" runat="server" AllowPaging="false" AllowMultiRowSelection="true"
           PageSize="20" Skin="Sitefinity" AllowSorting="false">
           <PagerStyle Mode="NumericPages" />
           <ClientSettings EnableRowHoverStyle="true" EnableAlternatingItems="false">
                   <Selecting AllowRowSelect="True" />
               </ClientSettings>
           <MasterTableView PageSize="20">
                   <Columns>
                       <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" ItemStyle-CssClass="sfCheckBoxCol" HeaderStyle-CssClass="sfCheckBoxCol" />
                       <telerik:GridTemplateColumn UniqueName="BinderContainer0" HeaderText="<%$ Resources:Labels, Version %>" HeaderStyle-CssClass="sfTitleCol" ItemStyle-CssClass="sfTitleCol"></telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn UniqueName="BinderContainer1" HeaderText="<%$ Resources:Labels, LastEdited %>" HeaderStyle-CssClass="sfDateAndHour" ItemStyle-CssClass="sfDateAndHour"></telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn UniqueName="BinderContainer2" HeaderText="<%$ Resources:Labels, By %>" HeaderStyle-CssClass="sfRegular" ItemStyle-CssClass="sfRegular"></telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn UniqueName="BinderContainer3" HeaderText="<%$ Resources:Labels, Notes %>" HeaderStyle-CssClass="sfRegular sfItemNote" ItemStyle-CssClass="sfRegular sfItemNote"></telerik:GridTemplateColumn>
                   </Columns>
            </MasterTableView>
       </telerik:RadGrid>
     
       <sitefinity:RadGridBinder id="historyGridBinder" runat="server"
               ServiceUrl="~/Sitefinity/Services/Versioning/HistoryService.svc"
               TargetId="historyGrid"
               BindOnLoad="false"
               OnClientItemEditCommand="OpenItem"
               OnClientItemDeleteCommand="ClientBinderDeleting"
               OnClientItemDataBound="UsersBinder_ItemDataBound"
               OnClientTargetCommand="UsersBinder_TargetCommand"
               OnClientError="UsersBinder_Error"
               DataKeyNames="Id"
               DataMembers="Id, CreatedByUserName, LastModified, Version, Comments"
               ContainerTag="div"
               LoadingPanelID="usersGridLoadingPanel">
           <Containers>
               <sitefinity:BinderContainer runat="server"
                   <div id="iconDiv" sys:class="sfItemVersionStatus">
                       <a sys:href="javascript:void(0);" class="editCommand sfItemTitle">{{Version}}</a>
                       <div>{{ChangeDescription}}</div>
                   </div>
               </sitefinity:BinderContainer
               <sitefinity:BinderContainer runat="server"
                   <span>{{LastModified.sitefinityLocaleFormat('dd MMM, yyyy; hh:mm tt')}}</span>
               </sitefinity:BinderContainer
               <sitefinity:BinderContainer runat="server"
                   <span>{{CreatedByUserName}}</span>
               </sitefinity:BinderContainer>           
               <sitefinity:BinderContainer runat="server"
                   <span id="noteContent">{{Comment}}</span><br />
                   <a sys:href="javascript:void(0);" id="btnNoteWrite" class="sf_binderCommand_editNote sfEditItemNote">{$VersionResources, WriteNoteLabel$}</a>
                   <a sys:href="javascript:void(0);" id="btnNoteEdit" class="sf_binderCommand_editNote sfEditItemNote">{$VersionResources, EditNoteLabel$}</a>
                   <a sys:href="javascript:void(0);" id="btnNoteDelete"class="sf_binderCommand_deleteNote sfDeleteItemNote">{$VersionResources, DeleteNoteLabel$}</a>
              </sitefinity:BinderContainer>           
           </Containers>
       </sitefinity:RadGridBinder>
       <sfFields:FormManager id="formManager" runat="server"/>


    All the best,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. Kristian
    Kristian avatar
    214 posts
    Registered:
    03 Jun 2010
    12 Aug 2011
    Link to this post
    Cool. this gives me the template, how do I tie in the version manager to my custom module?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    12 Aug 2011
    Link to this post
    Hello Kristian,

    RadGridBinder should perform the binding using the service.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  5. Kristian
    Kristian avatar
    214 posts
    Registered:
    03 Jun 2010
    12 Aug 2011
    Link to this post
    Ok, then I am not sure what I am missing if the service Url is in the radgridbinder

    I put the code your provided in a template and dropped it on the page that had my frontend view for my custom module. Clicking on one of my module items I'd expect the versioning to show up for that specific item. Maybe I am not understanding how the binder works?
5 posts, 0 answered