Recently worked on the custom master page, and the master page should be applied in the search site collection as well, then here is the tricky things.
In the search site collection page, the default.aspx page has style sheet that disable the ribbon div.
And in the results.aspx page, the titlerow is also made invisible, and the logo is moved below.
g_wsaSiteTemplateId variable is available to know the base template of the site.
So to make it be consistent with the original master page, javascirpt code can used to manually make those div blocks enabled.
_spBodyOnLoadFunctionNames.push("start");
function start(){...}
or include jquery such as,
if (g_wsaSiteTemplateId.substring(0, 4) == "SRCH")
{
//set the div back to visible
$('#s4-ribbonrow').css({'display':'block', 'height':'30px'});
$('#s4-titlerow').attr('style', 'display: block !important;');
$('#searchIcon').css({'display':'none' , 'height':'0px'});
}
No comments:
Post a Comment