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

Forums / Suggestions / Add Last Modified Date to Wiki

Add Last Modified Date to Wiki

6 posts, 0 answered
  1. MNP
    MNP avatar
    79 posts
    Registered:
    23 Apr 2008
    25 Nov 2009
    Link to this post
    I'm trying to modify the WikiSingleItem template and one of things I want to show is the last modified date on the content page. I know i can go and loop through WikiManager and find the last date (as it does on the history tab) but I'm looking just for that date.

    Would I have to go ahead and create my own Date Meta field and populate it myself?

    If so, can I suggest for Sitefinity to automatically keep this meta field for us.

    Thanks

    -Matt
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Nov 2009
    Link to this post
    Hello Matt,

    There are two options that you can use.

    1. Create a custom control that derives from WikiView  and override SetSingleItemContent there make a control reference and get the content object DateModified property.

    sample:

    protected override void SetSingleItemContent(IContent item)
     {
          base.SetSingleItemContent(item);
          Literal lit = new Literal();
          lit.Text = item.DateModified.ToShortDateString();
          Controls.Add(lit);
     }

    2. Another option is using a metakey and adding control to WikiViewSingleItem.ascx template which will show the last modified date.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. MNP
    MNP avatar
    79 posts
    Registered:
    23 Apr 2008
    26 Nov 2009
    Link to this post
    I almost got the part 1 to work, but am having trouble adding that new literal to a certain control. It works if I do like you suggested and do a simple controls.add(lit), however that places it in the top of the control

    Namespace Telerik.Wiki.WebControls 
       Public Class WikiViewExtended 
          Inherits Telerik.Wiki.WebControls.WikiView 
     
          
          Protected Overrides Sub SetSingleItemContent(ByVal item As Cms.Engine.IContent) 
             MyBase.SetSingleItemContent(item) 
     
             Dim newLit As New Literal 
             newLit.Text = Format(item.DateModified, "dd-MMM-yyyy"
     
             Dim lit As Control = FindControl("DateModified"
             lit.Controls.Add(newLit) 
     
          End Sub 
     
           
          Public Overrides Property ItemListTemplatePath() As String 
             Get 
                Return "~/MNP/Views/Wiki/WikiViewItemList.ascx" 
             End Get 
             Set(ByVal value As String
                MyBase.ItemListTemplatePath = value 
             End Set 
          End Property 
          Public Overrides Property SingleItemTemplatePath() As String 
             Get 
                Return "~/MNP/Views/Wiki/WikiViewSingleItem.ascx" 
             End Get 
             Set(ByVal value As String
                MyBase.SingleItemTemplatePath = value 
             End Set 
          End Property 
       End Class 
    End Namespace 

    My Template is like the following:
    <telerik:RadMultiPage ID="wikiPages" runat="server" SelectedIndex="0" RenderSelectedPageOnly="True"
        <telerik:RadPageView ID="wikiContent" runat="server" CssClass="sf_singleWiki sf_singleWikiContent"
            <asp:PlaceHolder ID="plhName" runat="server"
                <div class="displayArticleTitle"
                <asp:Literal ID="Name1" runat="server"></asp:Literal> 
            </div> 
            </asp:PlaceHolder> 
            <div class="articleMeta"
                   <span class="articledate"
                  <asp:Literal ID="DateModified" runat="server"></asp:Literal> 
                  
                </span> 

    This is probably super simple?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    27 Nov 2009
    Link to this post
    Hi Matt,

    Create a control reference to a Literal control that you should add to WikiViewSingleItem.ascx external template. You can add the literal to RadPageView with ID="wikiContent". You can also create a control reference using recursion to find your Literal control.

    Sample code:

    protected override void SetSingleItemContent(Telerik.Cms.Engine.IContent item)
    {
        base.SetSingleItemContent(item);
     
        this.DateLiteral.Text = item.DateCreated.ToShortTimeString();
    }
     
    public Literal DateLiteral
    {
        get
        {
            return base.WikiSingleContainer.GetControl<Literal>("MDate", false, Telerik.Framework.Web.TraverseMethod.BreadthFirst);
        }
    }


    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. MNP
    MNP avatar
    79 posts
    Registered:
    23 Apr 2008
    27 Nov 2009
    Link to this post
    So I've overridden the SetSingleItemContent and I created a literal control in my WikiViewSingleItem.ascx template.

    Namespace Telerik.Wiki.WebControls 
       Public Class WikiViewExtended 
          Inherits Telerik.Wiki.WebControls.WikiView 
     
          
          Protected Overrides Sub SetSingleItemContent(ByVal item As Cms.Engine.IContent) 
             MyBase.SetSingleItemContent(item) 
     
             Me.DateLiteral.Text = item.DateModified.ToShortDateString 
          End Sub 
         
          Public ReadOnly Property DateLiteral() As Literal 
             Get 
                Return MyBase.WikiSingleContainer.GetControl(Of Literal)("DateModified"True, Telerik.Framework.Web.TraverseMethod.BreadthFirst) 
     
             End Get 
          End Property 
     
          Public Overrides Property ItemListTemplatePath() As String 
             Get 
                Return "~/MNP/Views/Wiki/WikiViewItemList.ascx" 
             End Get 
             Set(ByVal value As String
                MyBase.ItemListTemplatePath = value 
             End Set 
          End Property 
          Public Overrides Property SingleItemTemplatePath() As String 
             Get 
                Return "~/MNP/Views/Wiki/WikiViewSingleItem.ascx" 
             End Get 
             Set(ByVal value As String
                MyBase.SingleItemTemplatePath = value 
             End Set 
          End Property 
       End Class 
    End Namespace 

    When i do that, it comes back with an error:
    Exception Type: System.ArgumentNullException 
     
    Message: The <head> tag does not have runat=server! 
    Parameter name: this.Page.Header 
     
    Source: Telerik.Cms.Web.UI 
     
    Stack Trace:  
       at Telerik.Cms.Web.UI.FileSelector.CreateChildControls() 
       at Telerik.Cms.Web.UI.JsFileLink.CreateChildControls() 
       at System.Web.UI.Control.EnsureChildControls() 
       at System.Web.UI.WebControls.CompositeControl.get_Controls() 
       at Telerik.Framework.Web.ControlTraverser.GetBreadthFirst(Boolean isRecursionCall) 
       at Telerik.Framework.Web.ControlTraverser.GetBreadthFirst(Boolean isRecursionCall) 
       at Telerik.Framework.Web.ControlTraverser.Next() 
       at Telerik.Framework.Web.ControlTraverser.MoveNext() 
       at Telerik.Cms.Web.UI.GenericContainer.FindTypedControl(String id, Type searchType, TraverseMethod method) 
       at Telerik.Cms.Web.UI.GenericContainer.GetControl[T](String id, Boolean required, TraverseMethod method) 
       at Telerik.Wiki.WebControls.WikiViewExtended.SetSingleItemContent(IContent item) in C:\inetpub\wwwroot\internalweb\App_Code\WikiViewExtended.vb:line 12 
       at Telerik.Cms.Engine.WebControls.ContentView.CreateSingleContent() 
       at Telerik.Cms.Engine.WebControls.ContentView.CreateChildControls() 
       at Telerik.Wiki.WebControls.WikiView.CreateChildControls() 
       at System.Web.UI.Control.EnsureChildControls() 
       at System.Web.UI.Control.PreRenderRecursiveInternal() 
       at System.Web.UI.Control.PreRenderRecursiveInternal() 
       at System.Web.UI.Control.PreRenderRecursiveInternal() 
       at System.Web.UI.Control.PreRenderRecursiveInternal() 
       at System.Web.UI.Control.PreRenderRecursiveInternal() 
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
    ------------------------------------------------------------------------------------ 

    I've looked in my master page and it does have a runat=server

    What am I missing?

    Thanks for all the help.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    27 Nov 2009
    Link to this post
    Hello Matt,

    Below is the whole implementation, just copy - paste. The code runs without problems.

    custom class in App_Code WikiViewCustomControl .cs

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Wiki.WebControls;
    using System.Web.UI.WebControls;
     
    /// <summary>
    /// Summary description for WikiViewCustomControl
    /// </summary>
    public class WikiViewCustomControl : WikiView
    {
        public WikiViewCustomControl()
        {
     
        }
     
        public override string ItemListTemplatePath
        {
            get
            {
                return "~/Sitefinity/ControlTemplates/Wiki/WikiViewItemList.ascx";
            }
        }
     
        public override string SingleItemTemplatePath
        {
            get
            {
                return "~/Sitefinity/ControlTemplates/Wiki/WikiViewSingleItem.ascx";
            }
        }
     
        protected override void SetSingleItemContent(Telerik.Cms.Engine.IContent item)
        {
            base.SetSingleItemContent(item);
            this.literal.Text = "CreatedOn:" + item.DateCreated.ToShortDateString();
        }
     
        public Literal literal
        {
            get
            {
                return base.WikiSingleContainer.GetControl<Literal>("Literal1", false, Telerik.Framework.Web.TraverseMethod.BreadthFirst);
            }
        }
    }

    our template.

    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls"
        TagPrefix="sfWeb" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfCtrl" %>
    <%@ Register Assembly="Telerik.Versioning" Namespace="Telerik.Versioning.WebControls" TagPrefix="sfCtrl" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfWeb" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="Telerik.Wiki" Namespace="Telerik.Wiki.WebControls" TagPrefix="sfCtrl" %>
    <%@ Register Assembly="Telerik.Wiki" Namespace="Telerik.Wiki.WebControls.Search" TagPrefix="sfCtrl" %>
    <%@ Register Assembly="Telerik.Search" Namespace="Telerik.Search.WebControls" TagPrefix="sfCtrl" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls.Admin" Assembly="Telerik.Cms.Engine" %>
    <%@ Register TagPrefix="cc" Assembly="App_Code" Namespace="Telerik.Samples1" %>
     
    <sfWeb:CssFileLink ID="CssFileLink2" EmbeddedFileName="Telerik.Wiki.Resources.ControlTemplates.Frontend.wikiCommonLayout.css" FileName="" Media="screen" runat="server" />
     
    <sfWeb:JsFileLink ID="JsFileLink1" runat="server" ScriptType="jQuery" />
     
    <telerik:RadTabStrip ID="wikiTabs" runat="server" SelectedIndex="0" EnableEmbeddedSkins="true" EnableEmbeddedBaseStylesheet="true" Skin="Black">
        <Tabs>
            <telerik:RadTab Text="<%$Resources:Content %>" Value="Content">
            </telerik:RadTab>
            <telerik:RadTab Text="<%$Resources:Edit %>" Value="Edit">
            </telerik:RadTab>
            <telerik:RadTab Text="<%$Resources:Comments %>" Value="Comments">
            </telerik:RadTab>
            <telerik:RadTab Text="<%$Resources:History %>" Value="History">
            </telerik:RadTab>
            <telerik:RadTab Text="<%$Resources:Search %>" Value="Search">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="wikiPages" runat="server" SelectedIndex="0" RenderSelectedPageOnly="True">
        <telerik:RadPageView ID="wikiContent" runat="server" CssClass="sf_singleWiki sf_singleWikiContent">
            <asp:PlaceHolder ID="plhName" runat="server">
            <h2 class="sf_wikiTitle">
                <asp:Literal ID="Name1" runat="server"></asp:Literal>
            </h2>
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="plhAuthor" runat="server">
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="emptyContent" runat="server">
                <p>
                    <asp:Label runat="server" Text="<%$Resources:FirstToCreatePage %>"></asp:Label>
                    <a href="javascript:void(0);"
                        onclick="window.location = $find('<%= wikiTabs.ClientID %>').findTabByValue('Edit').get_navigateUrl(); return false;">
                        <asp:Literal runat="server" Text="<%$Resources:CreateWikiPage %>"></asp:Literal></a>
                </p>
            </asp:PlaceHolder>
            <asp:Panel ID="pnlContent" runat="server" CssClass="sf_wikiContent">
                <asp:Literal ID="content" runat="server"></asp:Literal>
            </asp:Panel>
            <p class="sf_wikiAuthor">
                <asp:Literal runat="server" Text="<%$Resources:PostedByColon %>"></asp:Literal>
                <%--<asp:HyperLink ID="postedBy" runat="server">--%>
                    <asp:Literal ID="Author" runat="server"></asp:Literal>
                <%--</asp:HyperLink>--%>
            </p>
           <p class="sf_wikiAuthor">
                <asp:Literal ID="Literal1" runat="server"></asp:Literal>
            </p>
             
            <asp:PlaceHolder ID="plhCategory" runat="server">
                <p class="sf_wikiCategory">
                    <asp:Literal ID="Literal3" runat="server" Text="<%$Resources:Category %>" />: <asp:HyperLink ID="Category2" runat="server" />
                </p>
            </asp:PlaceHolder>
            <asp:Repeater ID="Tags" runat="server">
                <HeaderTemplate><p class="sf_wikiTags"><asp:Literal runat="server" Text="<%$Resources:Tags %>" />:</HeaderTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="tagLink" runat="server" />
                </ItemTemplate>
                <FooterTemplate></p></FooterTemplate>
            </asp:Repeater>
        </telerik:RadPageView>
        <telerik:RadPageView ID="wikiEdit" runat="server" CssClass="sf_singleWiki sf_singleWikiEdit">
            <asp:PlaceHolder ID="editContainer" runat="server">
                <h2 class="sf_wikiTitle">
                    <asp:Literal ID="editActionText" runat="server"></asp:Literal>
                    <asp:Literal ID="Name2" runat="server"></asp:Literal>
                </h2>
                <telerik:RadEditor runat="server" ID="Editor"
                    ContentAreaCssFile="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorContentArea.css"
                    ToolsFile="~/Sitefinity/Admin/ControlTemplates/EditorToolsFile.xml" Skin="Default"
                    NewLineBr="False" Width="95%">
                    <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" DeletePaths="~/Images" />
                    <MediaManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" />
                    <FlashManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" />
                    <DocumentManager ViewPaths="~/Files" UploadPaths="~/Files" DeletePaths="~/Files" />
                    <CssFiles>
                        <telerik:EditorCssFile Value="~/Sitefinity/Admin/Themes/Default/AjaxControlsSkins/Sitefinity/EditorCssFile.css" />
                    </CssFiles>
                </telerik:RadEditor>
     
            <script type="text/javascript">
     
                Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = function(commandName, editor, args) {
                    var editorArgs = editor.getSelectedElement();
                    if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
                        editorArgs = editor.getSelection();
     
                    var myCallbackFunction = function(sender, args) {
                        if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "IMG")
                            args.parentNode.replaceChild(editorArgs, args);
                        else {
                            var cloned = args.cloneNode(true);
                            var div = args.ownerDocument.createElement("DIV");
                            div.appendChild(cloned);
                            editorArgs.pasteHtml(div.innerHTML);
                        }
                    }
                    editor.showExternalDialog(
                               '<%= Page.ResolveUrl("~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx") %>',
                               editorArgs,
                               750,
                               600,
                               myCallbackFunction,
                               null,
                               'ImageLibraryDialog',
                               true,
                               Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                               false,
                               true)
                };
     
                Telerik.Web.UI.Editor.CommandList["LibraryDocumentManager"] = function(commandName, editor, args) {
                    var editorArgs = editor.getSelectedElement();
                    if (!editorArgs.nodeName || typeof (editorArgs.nodeName) == "undefined" || editorArgs.nodeName != "A")
                        editorArgs = editor.getSelection();
     
                    var myCallbackFunction = function(sender, args) {
                        if (typeof (editorArgs.nodeName) != "undefined" && editorArgs.nodeName == "A")
                            args.parentNode.replaceChild(editorArgs, args);
                        else {
                            var cloned = args.cloneNode(true);
                            var div = args.ownerDocument.createElement("DIV");
                            div.appendChild(cloned);
                            editorArgs.pasteHtml(div.innerHTML);
                        }
                    }
                    editor.showExternalDialog(
                               '<%= Page.ResolveUrl("~/Sitefinity/UserControls/Dialogs/DocumentEditorDialog.aspx") %>',
                               editorArgs,
                               750,
                               600,
                               myCallbackFunction,
                               null,
                               'ImageLibraryDialog',
                               false,
                               Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                               false,
                               true)
                };
     
                    var oldFunction = Telerik.Web.UI.Editor.CommandList["ToggleScreenMode"]; //save the original Paste function
     
                    Telerik.Web.UI.Editor.CommandList["ToggleScreenMode"] = function(commandName, editor, args) {
                        oldFunction(commandName, editor, args);
                        var bd = document.getElementsByTagName("body")[0];
     
                        if (/fullScreenMode/.test(bd.className)) {
                            var rep = bd.className.match(' ' + 'fullScreenMode') ? ' ' + 'fullScreenMode' : 'fullScreenMode';
                            bd.className = bd.className.replace(rep, '');
     
                        } else {
                            bd.className += bd.className ? ' ' + 'fullScreenMode' : 'fullScreenMode';
                        }
                    };
     
                    // automated tests helper function
                    function InsertTextArea() {
                        var editor = $find('<%=Editor.ClientID%>');
                        editor.set_html('<textarea id="myTableToFind" style="overflow:hidden; height: 300px; width: 500px;" border="none"></textarea>');
                    }
     
                    Telerik.Web.UI.Editor.CommandList["WikiLinkManager"] = function(commandName, editor, args) {
                        var editorArgs = editor.getSelectedElement();
     
                        var sel = editor.getSelection();
                        editorArgs = sel;
                        editorArgs.Html = sel.getHtml();
                        editorArgs.Text = sel.getText();
     
     
     
                    var myCallbackFunction = function(sender, args) {
                        var cloned = args.cloneNode(true);
                        var div = args.ownerDocument.createElement("DIV");
                        div.appendChild(cloned);
                        editorArgs.pasteHtml(div.innerHTML);
                    }
                    editor.showExternalDialog(
                       '<%= Page.ResolveUrl("~/Sitefinity/UserControls/Dialogs/WikiLinksDialog.aspx") %><%= wikiQueryString.Value %>',
                       editorArgs,
                       750,
                       600,
                       myCallbackFunction,
                       null,
                       'WikiLinkDialog',
                       false,
                       Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
                       false,
                       true)
                };               
            </script>
            <script type="text/javascript">
                function confirmDeleteWiki() {
                    return confirm('<%= GetLocalResourceObject("DeleteWikiPageConfirmationText") %>');
                }
            </script>
                <asp:HiddenField ID="wikiQueryString" runat="server" />
             
                <p class="sf_displayWikiName"><asp:CheckBox ID="DisplayName" runat="server" Text="<%$Resources:DisplayWikiName %>" /></p>
                 
                <div class="sf_wikiCategory">
                <asp:Label AssociatedControlID="Category" runat="server" Text="<%$Resources:Category %>"></asp:Label>
                    <sfCtrl:NewContentCategoriesField ID="Category" runat="server" />      
            </div>
                    <sfCtrl:NewCategory ID="addNewCategory" runat="server"></sfCtrl:NewCategory>   
            <div>
                    <sf:ContentTagEditor ID="tagsControl" runat="server" />
                </div>
                <p>
                    <asp:Button ID="saveEditContent" runat="server" Text="<%$Resources:Save %>">
                    </asp:Button>
     
            <asp:LinkButton ID="deleteWiki" runat="server" OnClientClick="return">
                        <asp:Literal runat="server" Text="<%$Resources:Delete %>"></asp:Literal>
                    </asp:LinkButton>
                </p>
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="editContainerNoPerm" runat="server" Visible="false">
                <p><asp:Literal runat="server" Text="<%$Resources:NotEnoughRightsModify %>"></asp:Literal></p>
            </asp:PlaceHolder>
        </telerik:RadPageView>
        <telerik:RadPageView ID="wikiComments" runat="server" CssClass="sf_singleWiki sf_singleWikiComments">
            <h2 class="sf_wikiTitle">
                <asp:Literal runat="server" Text="<%$Resources:CommentsOf %>"></asp:Literal>
                <asp:Literal ID="Name3" runat="server"></asp:Literal>
            </h2>
            <div id="comments" class="sf_contentComments">
                <cc:WikiCommentsListCustom ID="commentsList" runat="server" CssClass="sf_commentsList" ValidationGroup="commentInfo">
                </cc:WikiCommentsListCustom>
            </div>
        </telerik:RadPageView>
        <telerik:RadPageView ID="wikiHistory" runat="server">
            <asp:PlaceHolder ID="historyContainer" runat="server">
            <script type="text/javascript">
                Sys.Application.add_load(function() {
                    var totalChecked = 0;
                    jQuery('#<%= versionListControl.ClientID %>').find('.compare-checkbox :checkbox').each(function() {
                        if (this.checked) {
                            totalChecked++;
                        }
                    }).click(function() {
                        if (this.checked) {
                            if (totalChecked >= 2) {
                                alert('<%= GetLocalResourceObject("CannotSelectMoreThanTwoItems")%>');
                                this.checked = false;
                            } else {
                                totalChecked++;
                            }
                        } else {
                            totalChecked--;
                        }
                    })
                });
            </script>
            <h2 class="sf_wikiTitle">
                <asp:Literal runat="server" Text="<%$Resources:RevisionHistoryOf %>"></asp:Literal>
                <asp:Literal ID="Name4" runat="server"></asp:Literal>
            </h2>
            <sfCtrl:CompareVersionList ID="versionListControl" runat="server">
                <ListTemplate>
                    <sfWeb:CssFileLink ID="CssFileLink1"
                        FileName="~/Sitefinity/UserControls/Dialogs/AjaxControlsSkins/Sitefinity/Window.css" Media="screen" runat="server" />
                     <%--<h2 class="sf_gridTitle">
                        <asp:Literal ID="Literal1" runat="server" Text="Wiki page versions"></asp:Literal></h2>--%>
                    <asp:PlaceHolder ID="diffContainer" runat="server">
                        <p>
                        <asp:Label ID="versionsCompared" runat="server"></asp:Label>
                        </p>
                        <fieldset class="sf_contentDiff">
                            <legend><asp:Literal ID="Literal2" runat="server" Text="<%$Resources:ContentDiff %>"></asp:Literal></legend>
                            <asp:Literal ID="diffContent" runat="server"></asp:Literal>
                        </fieldset>
                    </asp:PlaceHolder>
                    <asp:GridView ID="GridView1" AllowPaging="false" AllowSorting="true" CssClass="sf_wikiVersions"
                        AutoGenerateColumns="false" GridLines="none" runat="server">
                        <Columns>
                            <asp:TemplateField ItemStyle-CssClass="sf_gridActions">
                                <ItemTemplate>
                                    <asp:HyperLink ID="view" Text="<%$Resources:View %>" runat="server"></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:ButtonField ButtonType="Link" CommandName="Delete" Text="<%$Resources:Rollback %>"
                                AccessibleHeaderText="<%$Resources:Rollback %>">
                                <ItemStyle CssClass="sf_gridActions" />
                           </asp:ButtonField>
                            <asp:BoundField DataField="Version" HeaderText="<%$Resources:Version %>">
     
                            </asp:BoundField>
                             <asp:TemplateField ItemStyle-CssClass="sf_gridActions sf_compare">
                                <HeaderTemplate>
                                    <asp:LinkButton runat="server" CommandName="Compare">
                                        <asp:Literal runat="server" Text="<%$Resources:Compare %>"></asp:Literal>
                                    </asp:LinkButton>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="compareVersion" runat="server" Checked="false" CssClass="sf_compareCheckbox"></asp:CheckBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="TimeStamp" HeaderText="<%$Resources:Date %>" HtmlEncode="false" DataFormatString="{0:dd MMM yyyy, hh:mm}" />
                            <asp:BoundField DataField="Modifier" HeaderText="<%$Resources:Modifier %>" />
                        </Columns>
                    </asp:GridView>
                </ListTemplate>
            </sfCtrl:CompareVersionList>
            </asp:PlaceHolder>
            <asp:PlaceHolder ID="historyContainerNoPerm" runat="server" Visible="false">
            <asp:Literal runat="server" Text="<%$Resources:NotEnoughRightsView %>"></asp:Literal>
            </asp:PlaceHolder>
        </telerik:RadPageView>
        <telerik:RadPageView ID="wikiSearch" runat="server" CssClass="sf_singleWiki sf_singleWikiSearch">
            <sfCtrl:WikiCombinedSearch ID="combinedSearch" runat="server">
            </sfCtrl:WikiCombinedSearch>       
        </telerik:RadPageView>
    </telerik:RadMultiPage>
    <asp:Repeater ID="Bookmarks" runat="server" Visible="false">
        <HeaderTemplate>
            <ul class="sf_socialBookmarks">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <asp:HyperLink ID="BookmarkLink" runat="server">
                    <asp:Image ID="BookmarkImage" runat="server" />
                </asp:HyperLink>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul></FooterTemplate>
    </asp:Repeater>

    You can implement the same logic for other views or other part of the control. Add the runat  attribute to your maste page.(<head runat="server">). The problem you have is not actually caused by WikiView contorol.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered