Module Backend Views

Posted by Community Admin on 05-Aug-2018 19:40

Module Backend Views

All Replies

Posted by Community Admin on 11-Aug-2011 00:00

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?

Posted by Community Admin on 12-Aug-2011 00:00

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

Posted by Community Admin on 12-Aug-2011 00:00

Cool. this gives me the template, how do I tie in the version manager to my custom module?

Posted by Community Admin on 12-Aug-2011 00:00

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

Posted by Community Admin on 12-Aug-2011 00:00

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?

This thread is closed