Accessibility
 
Home / Developer Center / Contribute Developer Center

Contribute Article

Icon or Spacer Icon or Spacer Icon or Spacer
Joseph Lowery
Joseph Lowery
jlowery@idest.com
 

Co-branding Contribute

You are a business owner with a wonderful new website created by your web developer. You have just purchased Macromedia Contribute, a new content solution created by the leader in professional web design software; with it, you're ready to add and update the pages of your website yourself. Your site administrator will handle the technical content. You have installed the program. Now what?

This article will help you get going with Contribute in just a few easy steps. First, we are going to discuss how to set up a local site, access web pages, and edit them with Contribute. Second, we will show you how to publish the finished pages to the remote site and how to create new pages. After you complete these easy steps, you will be able to do routine maintenance on your own!


Macromedia Contribute truly offers, as the slogan puts it, "relief for web professionals." But you may not realize that this newly introduced program can provide another function as well. With some minor modification, Contribute serves as a terrific business development tool. By customizing Contribute, you can supply solutions tailored to a particular client in a co-branded environment.

Contribute was built on the extremely extensible Dreamweaver MX foundation. Much of the interface, such as menus and toolbars, as well as the functionality found in objects and commands is also extensible in Contribute. In addition, there are two new areas open to customization:

  • Welcome page: The very first page users see when they start Contribute can be customized and, if desired, co-branded with your company's name and information.
  • Task panel: The lower portion of the Contribute sidebar, labeled with a user-friendly "How Do I" notation, provides a quick reference for basic program tasks—and can be customized to guide your client's users through company or industry-specific operations.

In this article, I examine how you can customize the Welcome page; a companion article, published in the Macromedia newsletter The Edge, covers modification to the Task panel.

Welcome to the Welcome page
If you've done any extensibility work with Dreamweaver, you're no doubt familiar with the Configuration folder. Contribute, too, has a Configuration folder, both for the system and the individual user. To customize the Welcome page, you must navigate to the system configuration folder, typically found at C:\Program Files\Macromedia\Contribute\Configuration. Within the Configuration folder, you'll find many subfolders; locate the Content folder and, within it, open the Welcome folder (see Figure 1).

 
Path to Welcome folder
Figure 1. The path to the Welcome folder


You may be surprised to not find a welcome.htm file in the Welcome folder; after all, Contribute is basically browsing to an HTML file to show the Welcome page. However, the Contribute engineers have more than a few tricks up their collective sleeves and one of them is to automatically generate a welcome.htm file when the program launches. This HTML file is based on the Dreamweaver template found in the Welcome folder, welcome.dwt.

Why take this roundabout approach? To understand their reasoning all you need do is take a close look at the default Welcome page. To the first-time user, it may not be obvious that there's more happening here than would be possible with a standard web page (see Figure 2), but once you add a Contribute connection or two, the page begins to looks a bit more like an application interface with some very non-HTML features.

 
Contribute application interface
Figure 2. Macromedia Contribute application interface.


After the helpful links inviting users to learn more about Macromedia Contribute or try out the tutorial, you'll notice a series of other links providing immediate access to any of the user's sites. Normally, this integration of external data and web page would not be possible outside of an application server environment. Following the connection list, you'll find a "Don't show this page on startup" option typically reserved for alerts and dialog boxes. As you'll see, Contribute includes a few extensibility mechanisms under the hood that make this kind of functionality possible, while keeping the page customizable.

Adding your brand
To begin modifying the Welcome page, open the file Contribute\Configuration\Content\Welcome\welcome.dwt in Dreamweaver. I recommend storing a backup of the original welcome.dwt just in case you accidentally delete an element of the code you want to retain. Now you're free to make any changes that you see fit—with certain restrictions.

Although the file is a Dreamweaver template, most of the standard rules regarding templates do not apply here. Here are the ground rules for editing the Welcome page:

  • The file is not stored in the Templates folder. It must be kept in its current location to be handled appropriately by Contribute.
  • The only document derived from this template is created automatically by Contribute when the program launches. It is not necessary to perform a New from Template operation.
  • Any links from the page should be absolute (as in "http://www.leafmedia.com") or created by an internal JavaScript call, as described later.
  • Assets for the page—images and CSS sheets—should be stored within the Welcome folder, either in the same folder as the welcome.dwt file or in a subfolder.
  • To retain the additional functionality of the standard Welcome page—such as the connection listings and the "don't show this page" option—it's better to modify the existing page instead of moving elements from the default Welcome page to a newly designed page. I discuss the reason for this approach in the next section.

When you're done, you can have an entirely different look-and-feel for the Contribute welcome page (see Figure 3) that reflects your brand and provides any additional support links that you think are necessary.

 
Rebranded Contribute welcome page
Figure 3. A rebranded Contribute welcome page.
(Click the image to see the full-sized screen.)


Maintaining the special features
Just how does Contribute add their special features? By applying a combination of advanced Dreamweaver template techniques with enhanced Contribute API JavaScript functions. Let's take a closer look at how it all works together, so that you can understand how to modify the page better.

The listing of sites uses two conditional regions, an editable region and a repeating region, as you can see in this code (indentation added for clarification):

<!-- TemplateBeginIf cond="!HasSites" -->
   <a href="mmjs:CCWorkspaceManager.getManager(dw.getDocumentDOM())    .doWelcomePageStart();">
   <strong>Start editing</strong></a> pages on your website.
<!-- TemplateEndIf -->
<!-- TemplateBeginIf cond="HasSites" -->
   Start editing pages on your website:<br>
      <blockquote style="margin-top: 0;">
         <!-- TemplateBeginRepeat name="Site" -->
            <!-- TemplateBeginEditable name="SiteName" -->
               Site name
            <!-- TemplateEndEditable -->
         <br>
      <!-- TemplateEndRepeat -->
   </blockquote>
<!-- TemplateEndIf -->

The first conditional region displays a link to the My Connections dialog box if no connections have been created yet through an API call. The second conditional region appears if any connections have been created. Both conditional regions depend on a template parameter found in the <head> of the document called HasSites. Be sure to preserve this code when modifying the page:

<!-- TemplateParam name="HasSites" type="boolean" value="true" -->


Both the repeating and editable regions are contained within the second conditional region. Be careful not to alter the names of these regions: Site and SiteName, respectively. Modifying the names breaks the functionality.

The other unique feature on this page, the "Don't show this page on startup" option, uses an internal cookie. When the user clicks the option, the cookie (dontshow) is set to either true or false. If the cookie is true, the Welcome page is bypassed and the initially declared connection is shown. The naming of the checkbox (dontShowCheckbox), as well as its onClick function call, is critical to keep if you want to maintain this option.

Should you not want to give your users the option of seeing the Welcome page, you'll need to do more than just remove the form element containing the checkbox and all of its contents. If you look at the <body> tag, notice the onLoad event that calls initControls(). The initControls() function populates the checkbox in the Welcome page if the dontshow cookie is set. How do users show the Welcome page once they've opted not to see it? The page is displayed whenever they choose Help > Welcome. If you want to remove the "don't show" option, be sure to also remove the onLoad event from the <body> tag and the initControls() function from the <head>.

Deploying your custom pages
The major hurdle to customizing Macromedia Contribute in this first release is the lack of support for the Extension Manager. This is similar to the early days of Dreamweaver when you installed extensions by copying files manually. To add your own Welcome page (and all of its assets), try one of these three options:

  • Deliver the files with a help file that describes where the files should be copied.
  • Use a third-party installer to deploy the files in an existing installation of Contribute. Unless you know for sure that Contribute is always installed in the same location, the installer should be able to read the Windows registry and locate the Contribute installation folder.
  • Use a third-party installer to deploy a new installation of Contribute bundled with the Welcome page. This option requires a more sophisticated installer than the second option.
If you decide to go the third-party installer route, there are numerous options available, from the extremely high-end (and costly) to low-end, shareware versions. Whichever route you take, once the installation is complete, your business stands to benefit by associating your brand with that of easy-to-use, powerful Macromedia Contribute.
 

About the author
Joseph Lowery is an author and extension developer. His books on the Web and Web-building tools are international best-sellers, having sold over 300,000 copies world-wide in 9 different languages. He is the author of the Beyond Dreamweaver, Roadmap to Macromedia Contribute and co-author of Dreamweaver MX Killer Tips, all from New Riders, as well as Dreamweaver MX Bible and the Fireworks MX Bible series from Wiley Publishing. As a programmer, Joseph contributed two extensions to the latest release of Fireworks MX and many, many extensions for Dreamweaver. With Ben Weiser, he developed the widely-used Deva Tools for Dreamweaver and most recently released FlashBang! in partnership with Edoardo Zubler. He is also a consultant and trainer and has presented at Seybold in both Boston and San Francisco, Macromedia UCON in the U.S. and Europe, ThunderLizard's Web World and Fawcette Publication's WebBuilder.