Click here to Skip to main content
15,884,472 members
Articles / Web Development / ASP.NET
Article

Microsoft Content Management Server Create/Delete Channel Web Author Plug-ins (C#)

Rate me:
Please Sign up or sign in to vote.
4.33/5 (7 votes)
17 May 2006CPOL2 min read 112.2K   736   24   21
This set of plug-ins add options to Create and Delete Channels in the Content Management Server Web Author.

Sample Image - sample.gif

Description

For use in the Microsoft Content Management Server, this set of plug-ins (written in C#) allows Administrators and Channel Managers to create and delete Channels using the Web Author. The Create Channel dialog also provides an option to create a default page for the newly created channel. When a default page template is selected, the user will be directed to the authoring view of the default page within the newly created channel. The user can either fill in content and click Save to create the default page, or click Cancel without creating the default page.

A VB.NET version of this set of plug-ins is available here.

Installation Procedures

  1. Copy all files in the directory WebControlLibray to the web control library project of your MCMS solution.
  2. Copy the directory WebAuthor to the root of your MCMS site.
  3. In your console control, register CustomAction, include Console.js, add ChannelCreateAction and ChannelDeleteAction to PresentationModeContainer (Unpublished), and add FailedChannelDelete to ErrorConsole. The following are the changes required as done in DefaultConsole.ascx.
    ASP.NET
    <%@ Register TagPrefix="CustomAction" 
      Namespace="QuestechSystems.WebControls.ConsoleControls" 
      Assembly="WebControl Library Assembly Name" %>
    
    ......
    
    <CmsConsole:Console runat="server" id="Console1">
       <script language="javascript" type="text/javascript" 
         src="/<MCMS Site Application Name>/WebAuthor/Client/Console.js"></script>
    
     ......
    
     <cms:PresentationModeContainer mode="Unpublished" runat="server" 
       id="PresentationUnpublishedModeContainer1">
     
     <CustomAction:ChannelCreateAction 
          id="ChannelCreateAction1" runat="server">
      <A id=ChannelCreateAnchor 
       onclick="<%# Container.ActionJavascript %>;return false" 
       href="#" 
       target=_self><%# Container.Text %>
      </A>
      <BR>
     </CustomAction:ChannelCreateAction>
     <CustomAction:ChannelDeleteAction 
           id="ChannelDeleteAction1" runat="server">
      <A id=ChannelDeleteAnchor 
       onclick="<%# Container.ActionJavascript %>;return false" 
       href="#" 
       target=_self><%# Container.Text %>
      </A>
      <BR>
     </CustomAction:ChannelDeleteAction>
     <CmsConsole:ChannelPropertiesAction 
       id="ChannelPropertiesAction1" runat="server">
    
     ......
    
     </CmsConsole:ChannelPropertiesAction>
    
     ......
    
    </cms:PresentationModeContainer>
    
    ......
    
    </CmsConsole:Console>
    
    <CmsConsole:ErrorConsole runat="server" id="ErrorConsole1">
    
    ......
    
     <cms:ErrorModeContainer id="ErrorModeContainerFailedChannelDelete1" 
                      runat="server" mode="FailedChannelDelete">
      <b><font color="red">
        <%# Container.Error.Title %>
       </font></b>
      <hr>
      <font color="red">Error Details:<br>
       <font size="-2">
        <%# Container.Error.Exception.Message %>
       </font></font>
     </cms:ErrorModeContainer>
    
    ......
    
    </CmsConsole:ErrorConsole>
  4. Rebuild your site solution in Visual Studio, and you are all set.

History

  • V1.0 - 2004.04.10 - Base.
  • V1.1 - 2004.07.08
    • Fixed the missing buttons in the dialog.
    • Split CustomAction.cs into ChannelCreateAction.cs and ChannelDeleteAction.cs.
  • V1.2 - 2004.10.09 - Added an option to create a default page.
  • V1.21 - 2005.07.08 - Renamed the namespaces and updated the installation instructions.
  • V1.3 - 2006.05.14 - Added an ASP.NET 2.0 version.

Notes

If a channel is empty, MCMS will render the channel using the default cover page. You will, therefore, need a Channel Rendering script to fully utilize this set of plug-ins. Please see the MCMS documentation, "Creating Channel Rendering Scripts", for details.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
A Microsoft Certified Professional Developer and Technology Specialist.

Experience and expertise in SharePoint 2016 / 2013 / 2010 / 2007.

Role ranges from a developer in a multi-person team to a solution consultant with expert-level skills, leading a project to completion status.

Proven experience working effectively in a team environment and a self-managed environment.

Comments and Discussions

 
GeneralASP 2.0 Pin
anichin13-Mar-06 6:46
anichin13-Mar-06 6:46 
GeneralRe: ASP 2.0 Pin
Stephen Huen13-Mar-06 18:43
Stephen Huen13-Mar-06 18:43 
GeneralRe: ASP 2.0 Pin
anichin14-Mar-06 4:59
anichin14-Mar-06 4:59 
GeneralC# Create Channel Pin
Alan Hendry7-Jul-05 3:50
Alan Hendry7-Jul-05 3:50 
GeneralRe: C# Create Channel Pin
Stephen Huen12-Jul-05 6:55
Stephen Huen12-Jul-05 6:55 
GeneralRe: C# Create Channel Pin
Alan Hendry20-Jul-05 23:33
Alan Hendry20-Jul-05 23:33 
Generalcannot get &quot;Delete Channels&quot; to be seen Pin
Member 172012827-Apr-05 13:56
Member 172012827-Apr-05 13:56 
GeneralRe: cannot get &quot;Delete Channel&quot; to be seen Pin
Member 172012827-Apr-05 14:17
Member 172012827-Apr-05 14:17 
GeneralRe: cannot get &quot;Delete Channel&quot; to be seen Pin
Stephen Huen27-Apr-05 17:35
Stephen Huen27-Apr-05 17:35 
General[help] change location of &quot;Create Channel&quot; option Pin
R. Queiroz7-Sep-04 6:40
R. Queiroz7-Sep-04 6:40 
GeneralRe: [help] change location of &quot;Create Channel&quot; option Pin
Stephen Huen7-Sep-04 8:32
Stephen Huen7-Sep-04 8:32 
GeneralRe: [help] change location of &quot;Create Channel&quot; option Pin
R. Queiroz7-Sep-04 9:42
R. Queiroz7-Sep-04 9:42 
Stephen, first of all, thank you very much for the fast reply Smile | :)

I will try to explain the problem i'm having a little bit better:
I'm indeed using a cover page to manage navigation through the channels avaiable in CMS. That cover page has a link to "switch to edit site". That link provides a list with several option, like "create a new page" ou "channel properties", for example. I would like to include the option to create a new channel (privided by your plug-in) on that very same list.

The problem:
Your plug-in works very well, but CMS WebAuthor's users can only find the "create new channel" option when viewing the "switch to edit site" menu on an already created page/posting. That's because the plug-in was inserted on the defaultconsole (thus, only avaiable on the postings and not on the cover pages).
This makes it impossible to create a new channel when navigating on the channel tree displayed by my cover page.

Example: imagine i have an empty channel and i want to create another channel inside it. I navigate inside the parent channel and i can't see the option to create the child channel. I must create a new page/posting, enter that posting, switch to edit site and then select "create new channel". I then have to go back to the parent channel and delete the page/posting i created...

It would be great if i could add the option to create new channels to the menu that opens when i choose "switch to edit site" on my cover page. That way i would be able to create channels without the need to create a new posting.

I tried my best but i couldn't include your plug-in on that menu, like i did on the defaultconsole.

Sorry for the (very) long post... and thanks again for the precious help Smile | :)

Take care!
GeneralRe: [help] change location of &quot;Create Channel&quot; option Pin
Stephen Huen7-Sep-04 10:56
Stephen Huen7-Sep-04 10:56 
GeneralRe: [help] change location of &quot;Create Channel&quot; option Pin
R. Queiroz7-Sep-04 23:54
R. Queiroz7-Sep-04 23:54 
GeneralRe: [help] change location of &quot;Create Channel&quot; option Pin
Stephen Huen8-Sep-04 4:52
Stephen Huen8-Sep-04 4:52 
GeneralStart Publishing Date Pin
tarajan23-Aug-04 21:10
tarajan23-Aug-04 21:10 
GeneralRe: Start Publishing Date Pin
Stephen Huen25-Aug-04 7:17
Stephen Huen25-Aug-04 7:17 
GeneralV1.1 requires MCMS SP1a Pin
Stephen Huen9-Jul-04 5:35
Stephen Huen9-Jul-04 5:35 
GeneralFix on the missing buttons Pin
eriknils31-May-04 19:49
eriknils31-May-04 19:49 
GeneralRe: Fix on the missing buttons Pin
WillemM9-Jul-04 19:34
WillemM9-Jul-04 19:34 
GeneralFix on the missing buttons Pin
Anonymous31-May-04 19:47
Anonymous31-May-04 19:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.