As mentioned at the beginning of this chapter, CMS 2002 ships with two versions of the Web Author. This section quickly discusses how you can make changes to the ASP version. Based on this example, you should get an idea of where to start if you want to make changes to the ASP Web Author.
Adding an Option to the Web Author
This example shows how you can create a new action for the ASP version of the Web Author. Just like the .NET Web Author, the ASP version was designed to allow users to modify the console. The example adds a new link to the Web Author console. This new link opens a window that represents the new action page. The example shows that this new window could also be a CMS posting.
The first thing you will need to do is add a call to the new function in ConsoleUI.inc (the default location is C:\Program Files\Microsoft Content Management Server\Server\IIS_NR\System\WBC\Customizable\SiteEmbeddedWBCLinks\ConsoleUI.inc). Keep in mind that there are different versions of the console. Choose which console you are using. The default console is the one located at C:\Program Files\Microsoft Content Management Server\Server\IIS_NR\System\WBC\Customizable\SiteEmbeddedWBCLinks\WBCConsole\FlatHTMLConsole.
Add this code to the console file (line 210):
This code opens a new window and displays another CMS posting. You do not have to do it this way. In fact, the Web Author uses stand-alone ASP pages to open the action windows. But you can see from this example that either method is possible.
The next choice is which Web Author mode you would like to use to show the new action. For example, if you want to add the action during the regular Edit site mode, you should add your new call to EditSite Ops.inc (the default install location is C:\Program Files\Microsoft Content Management Server\Server\IIS_NR\System\WBC\Customizable\SiteEmbeddedWBCLinks\WBCConsole\EditSiteOps.inc).
This code adds the link to the Web Author application (line 32):
You can see that you get the posting object by its path. This method is easier to maintain than a GUID. However, a GUID search would be faster. The posting returned is the object that represents the UI for the command. For better encapsulation, you could put this code into an include file.
This example should help you add or remove options from the ASP version of the Web Author console. Unlike the .NET version of the Web Author, the ASP code is not compiled, so keep in mind that the complete code for the ASP Web Author is there for your viewing pleasure. Just be sure to check the legal statements about what changes are supported by Microsoft PSS.