I'm using a page layout to style some content pages on my Sharepoint 2010 public facing website. On this specific page layout I need to add something which is only visible from the third level of subsites, this meaning this level: http://www.website.com/subsite1/subsubsite1/pages/default.aspx
When a user is on this level, sitename subsubsite1, he/she needs to see a server control. Is there a way I can do such a thing, without needing to code something. I create a webpart which could do such a thing, but that's not a preferred option.
I'll try to make this a bit more concrete with an example. The thing I need to add is an asp:Repeater which contains several menu items of the next level of subsites. The reason we use an asp:Repeater for it is because the default sharepoint:Menu screws up our html (there'a a table wrapper around the menu), also we've got a bit more control on the created html when using this repeater.
The page layout looks like this:
<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
<SharePointWebControls:FieldValue id="PageTitle" FieldName="Title" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
<div id="left_content_container_big" class="global_settings_containers">
<div id="top_shadow" class="global_settings_containers">
</div>
<div id="middle_shadow" class="global_settings_containers">
<div id="left_content_big">
<div class="left_content_big_menu">
<div id="sub_submenu" class="">
<asp:Repeater ID="SubMenuLevel3" runat="server" DataSourceID="cjgSiteMapLevel3">
<HeaderTemplate><ul id="sub_submenu_ul" class=""></HeaderTemplate>
<ItemTemplate><li><a href="<%# Eval("Url")%>" class="" >
<%# Eval("Title")%></a></li></ItemTemplate>
<FooterTemplate></ul></FooterTemplate>
</asp:Repeater>
</div>
<asp:SiteMapDataSource
ShowStartingNode="false"
SiteMapProvider="CurrentNavSiteMapProvider"
EnableViewState="true"
StartFromCurrentNode="false"
StartingNodeOffset="2"
id="cjgSiteMapLevel3"
runat="server"/>
</div>
<div id="left_content_big_cnt">
<div class="PageTitle">
<SharePointWebControls:FieldValue id="PageTitle2" FieldName="Title" runat="server"/>
</div>
<PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" runat="server"></PublishingWebControls:RichHtmlField>
<WebPartPages:SPProxyWebPartManager runat="server" id="spproxywebpartmanager"></WebPartPages:SPProxyWebPartManager>
<WebPartPages:WebPartZone id="WPZone_Main" runat="server" title="Main"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
</div>
</div>
</div>
<div id="bottom_shadow" class="global_settings_containers">
</div>
</div>
</asp:Content>
Now all I need to do is add something to the repeater so it's only shown from the third level. Using a different page layout could be an option, but just as creating a webpart, not really preferred.
Any ideas?