On a branding website, I placed header and footer in the master page. Then I created the layout for welcome page and another for sub-sites. Now, the footer in main page has an extra row (a div nested inside the footer) for search-bar, but the sub-sites won't have the search field there.
Having said that, what would be the best way to handle it.
Should I create a separate master-page for sub-sites excluding the search row?
[untidy way] Should I put the opening tag and the search-row in the layout of welcome page and just the opening tag in the sub-site's layout (while keeping the rest of footer in master-page)?
Should I place a condition in master page, something like:
<% if((new SiteTools()).getLayout(Request) == "WelcomeLayout") %>
(by turning safe mode parser off -- bad idea that is)?
Or is there anything like SSI or render-partial in SharePoint?
Please suggest the better approach.
This is the nested HTML inside the footer, which should only appear on the Home page:
<div class="search_wrapper"> <div class="search_area"> <div class="search_catrgories"> <select class="categories_selection"> <option value="1">All Categories</option> <option value="2">Product</option> <option value="3">Safety Data</option> </select> </div> <div class="search_fields"> <asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server"> <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4" /> </asp:ContentPlaceHolder> </div> </div> </div>