Datasheet
a result of this change there has been a dramatic decrease in the number of files required to create a
Community Server theme.
Another huge advantage to using the new Chameleon controls is that they provide inherent data
binding. This means that a theme developer does not have to know how to query and get posts in order
to display them. Now whenever a
WeblogData control is added to a page, it knows to only display the
data for the weblog that is on the current page.
In Chapter 5, you will learn much more about Chameleon. Chapter 5 discusses the various controls
that are provided with Chameleon. This is an essential chapter that will help you learn much more
about Chameleon.
Request to Rendering Diagram
In order to help you understand how URL rewriting and theming works in Community Server it is
useful to look at an individual request to a site. The important thing to realize is that Community Server
uses a custom HTTP module that makes URL rewriting occur. This is necessary because the module
allows for custom code to execute during the processing of the ASP.NET pipeline. Figure 1-1 presents
the basic steps that occur to make URL rewriting and loading of the appropriate theme page.
Figure 1-1: Page Request Including URL Rewriting Diagram
Whenever a request comes to a Community Server site that has the
CSHttpModule enabled, the steps
in Figure 1-1 take place. Early in the pipeline Community Server rewrites the requested path to the
one configured by the URL data. More information about how the appropriate path is determined can
be found in Chapters 3 and 4. Basically, though, at this point you should simply realize that specific URL
requests are mapped to pages on a site.
Whenever this rewriting process occurs, the selected theme is included in the rewritten path. This means
that if the
home.aspx page is rewritten on a site using the default theme, the page at Themes/default/
Common/home.aspx
will be loaded. However, if the site were running the Lean and Green theme, the
Themes/leanandgreen/Common/home.aspx page would be processed and returned to the client.
4
Chapter 1: Key Concepts
82086c01.qxd:WroxPro 9/30/07 11:48 PM Page 4