Home > Articles > Web Development > Content Management Systems

Running Code Snippets Within Templates in CMS 2001

  • Print
  • + Share This
As of IIS 5.0, you can "include" code snippets within an ASP page. Combine this functionality with small ASP pages stored in the resource gallery of CMS 2001, and your content contributors can contribute new functionality as content in a placeholder. Shawn Shell provides details.
Like this article? We recommend

Like this article? We recommend

Overview

As a technologist, I'm always looking for ways to make my life and the lives of the people I support easier. When Content Management Server was released, it provided us with a great web site management tool—I could concentrate on providing innovation through web technologies, and my clients could concentrate on maintaining the content. However, there has always been something missing. If I wanted to provide some new piece of technology or an enhancement to a client's web site, I would have to write a whole new template. Further, if the client wanted to implement that new technology or function across some or all of their web site's templates, I was stuck creating and/or modifying templates. There had to be a better way.

What if it were possible to create atomic code snippets—essentially a code chunk that was self-contained and perform a single unit of work—and allow content contributors to contribute those snippets to a page? For instance, creating a script that produced a pie chart from some information stored in a database, or code that would summarize all of the postings in a single channel.

Now, what if it were possible to store these snippets in the resource gallery?

If you're interested in all of the above, read on!

IIS 5.0 brought the advent of the ability to "include" code snippets within an ASP page. If you combine this functionality with small ASP pages stored in a resource gallery, you now have the ability—as a developer—to create a code snippet that adds new functionality to a template and allows a content contributor to contribute that new functionality as content in a placeholder.

  • + Share This
  • 🔖 Save To Your Account