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

Forums / Developing with Sitefinity / Simple interface for publishers

Simple interface for publishers

6 posts, 0 answered
  1. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    11 Mar 2009
    Link to this post

    I'm create a page Publishers.aspx in which I want place RadMultiPage component.

    To this page I make authentification by UserManager.Default.ValidateUser. Its component will contain 4 pages: News, Events, Polls and Image Gallery.

    I try this code:

    using System;  
    using System.Data;  
    using System.Configuration;  
    using System.Collections;  
    using System.Web;  
    using System.Web.Security;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using System.Web.UI.WebControls.WebParts;  
    using System.Web.UI.HtmlControls;  
     
    using Telerik;  
    using Telerik.Web.UI;  
    using Telerik.Cms.Web.UI;  
    using Telerik.Cms.Web;  
     
    public partial class Publishers : ModulesAdminPage  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!this.Page.User.Identity.IsAuthenticated)  
            {  
                this.Page.Response.Redirect("~/Publishers/PublishersLogin.aspx");  
            }  
            if (base.Module != null)  
            {  
                this.contolPanel = null;  
                if (base.Module is WebModule)  
                    this.contolPanel = ((WebModule)base.Module).CreateControlPanel(thistrue);  
                else  
                    this.contolPanel = base.Module.CreateControlPanel(this);  
                if (this.contolPanel != null)  
                {  
                    this.contolPanel.ID = "contolPanel";  
                    this.ControlPanelHolder.Controls.Add(this.contolPanel);  
                }  
     
                if (this.contolPanel is Telerik.Web.IControlPanel)  
                {  
                    Telerik.Web.IControlPanel ctrlPnl = (Telerik.Web.IControlPanel)this.contolPanel;  
                    foreach (Telerik.Web.ICommandPanel cmdPnl in ctrlPnl.CommandPanels)  
                        this.ToolBoxHolder.Controls.Add((Control)cmdPnl);  
                }  
                else  
                {  
                    int i = 0;  
                    foreach (IControlPanelCommand ctrl in base.Module.CreateToolBoxControls(this))  
                    {  
                        if (ctrl is Control)  
                        {  
                            i++;  
                            Control ctrl2 = ctrl as Control;  
                            ctrl2.ID = "toolBox" + i;  
                        }  
                        ctrl.ControlPanelID = "contolPanel";  
                        this.ToolBoxHolder.Controls.Add((Control)ctrl);  
                    }  
                }  
            }  
        }  
        private Control contolPanel;  
    }  

     Publishers.aspx file:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Publishers.aspx.cs" Inherits="Publishers" %>  
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
     
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title></title>  
    </head>  
    <body>  
        <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager>  
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server"   
            MultiPageID="RadMultiPage1">  
            <Tabs>  
                <telerik:RadTab runat="server" Text="News" PageViewID="NewsPageView">  
                </telerik:RadTab>  
                <telerik:RadTab runat="server" Text="Events" PageViewID="EventsPageView">  
                </telerik:RadTab>  
                <telerik:RadTab runat="server" Text="Polls">  
                </telerik:RadTab>  
                <telerik:RadTab runat="server" Text="Gallery">  
                </telerik:RadTab>  
            </Tabs>  
        </telerik:RadTabStrip>  
        <telerik:RadMultiPage ID="RadMultiPage1" Runat="server">  
            <telerik:RadPageView ID="NewsPageView" runat="server">  
                News  
                <asp:PlaceHolder ID="ControlPanelHolder" runat="server"></asp:PlaceHolder>  
                <div class="in">  
                    <asp:PlaceHolder ID="ToolBoxHolder" runat="server"></asp:PlaceHolder>  
                </div>  
            </telerik:RadPageView>  
            <telerik:RadPageView ID="EventsPageView" runat="server">  
                Events 
            </telerik:RadPageView>  
        </telerik:RadMultiPage>  
        </form>  
    </body>  
    </html>  

     I want that when I press the News page in RadMultiPage I see 

    the news module without components shown on this picture:

    http://i39.tinypic.com/zkput0.jpg

  2. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    11 Mar 2009
    Link to this post
    1. Anybody can help me please?
  3. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    11 Mar 2009
    Link to this post
    1. Anybody can help me please?
  4. rent
    rent avatar
    104 posts
    Registered:
    05 May 2008
    12 Mar 2009
    Link to this post

    Well I want to do this such as in this picture 

    http://i39.tinypic.com/zkput0.jpg

  5. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    12 Mar 2009
    Link to this post
    Hi,

    I post some information. You are not in the right way. If you like create own pages,  you not need to modify the admin of SF. You need to create your external page with the elements and use your code to create News or Events , and same for listing your items. You can search in dev forum how to add News or Events. Personaly I have posted similar features 2 times.
    Public interfaces will come with the next v4 but like you i need the same interfaces public side for now. Regards.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 Mar 2009
    Link to this post
    Hi rent,

    Thank you for using our services.

    In your solution you need to call ContentManager.CreateContent() - this will allow to your publishers to create content.  As I see you have copied the code behind of Sitefinity/Admin/Modules.aspx.cs and put it as a code behind of your page. You need to modify the dode behind and  set   MasterPageFile="~/Sitefinity/Admin/Admin.master" in your page template. Then, modify Admin.master page. For instance you could remove DataSourceID="MainMenuDataSource1" from the admin master - thus the tabs will be hidden - this will affect the admin part of the website. You could create a new MasterPageFile that is identical with Admin.paster and use it in your page declaration.

    I hope this helps.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
6 posts, 0 answered