One of the functions of Chameleon I use a lot is the DisplayConditional control. It's incredibly versatile. I often search through the CS.Web application .ASPX pages for various use examples of DisplayConditional controls. One such condition I used twice today in different contexts was the DisplayConditional used in conjunction with the CurrentSiteUrlCondition CScontrol.
Let's say we wanted to place a message on our site to appear on all weblog home pages, and ONLY on weblog home pages. To achieve that we could add a placeholder to a .master page and test the current Site Url with the following.
<CSControl:PlaceHolder ID="DirectoryHomeMessage" Runat="server">
<DisplayConditions><CSControl:CurrentSiteUrlCondition
ID="CurrentSiteUrlCondition1" SiteUrlName="weblogs.weblogapplication"
runat="server" /></DisplayConditions>
<ContentTemplate>
<CSControl:ResourceControl ResourceName="DirectoryHeader_AdvertiseMessage"
runat="server" />
<p></p>
<CSControl:SiteUrl ResourceName="DirectoryHeader_AdvertiseHere"
UrlName="advertisefaq" runat="server" />
</ContentTemplate>
</CSControl:PlaceHolder>
Notice the SiteUrlName must include the SiteUrls.config location name as well as the url name.