Posted on:
Categories: SharePoint
Description:
In SharePoint 2010 and 2013 sites, specifically intranets, I find myself often having subsites with only 1 page the welcome page. And by default, each of these pages all have the page title Home. Many users report finding that confusing, as even though that page is the home page of the current web, it is not the home page of the entire site, which is typically what the users would expect home to mean. See below for an example of this Note, we are in a subsite, but the breadcrumb still reads Home. A typical alternative to naming the home pages of each web the name of the web, but then you end up with what looks like a duplicate in the breadcrumb Solution! It occurred to me that the SharePoint server-side object model exposes a property in the SPContext SPContext.Current.ContextPageInfo.IsWebWelcomePage So I created a Control Template which I could then include into my master page to inject styles to hide the page title in the breadcrumb only if the user is currently viewing the welcome page (ie. the "Home" page. To do this, simply create a new Control Template in your Visual Studio project, and include the following code in the Page_Load method if (SPContext.Current == null || SPContext.Current.ContextPageInfo == null || !SPContext.Current.ContextPageInfo.IsWebWelcomePage) return; StylesLiteral.Text = "<style type=\"text/css\">" + " .s4-title .s4-titletext > h2, .s4-title .s4-titletext > span.s4-titlesep " + " display none; " + "</style>"; And then in my custom master page, I simply had the following registration at the top... <%@ Register TagPrefix="Softlanding" TagName="BreadcrumbOverrideControl" src="~/_controltemplates/YourCustomSolutionName/BreadcrumbOverrideControl.ascx" %> ...and then the following within the <head> tag... <SoftlandingBreadcrumbOverrideControl runat="server" id="SLBreadcrumbOverride" /> No more Home! And now in landing pages (aka welcome pages), we will no longer see the page title or the little arrow next to the page title




Posted on:
Categories: SharePoint
Description:
Configuring SharePoint 2010 search with a custom thesaurus file allows administrators to manage user search queries in two ways By using replacement sets to transparently replace user user queries terms with designated alternatives. This is similar to "Did you mean?" functionality without the "Did you mean?" link. The query engine performs the replacement automatically. By using expansion sets to transparently include common synonyms for search terms. A search query term that has a match in an expansion set will automatically include all other terms in that expansion set. Put simply, with replacement sets, what is included between PAT tags will be replaced with the term between the associated SUB tag. You can have multiple PAT's per SUB however you cannot have duplicate PAT's in the collection of all replacement sets. Obviously, you can replace a term with only one substitution. You also can not duplicate SUB's in expansion sets across all expansion sets. Special characters are also to be avoided in all items. You CAN however, have an identical SUB term in an expansion set that exists as a SUB in a replacement set. Note this will NOT result in a replacement translated into an expansion set. For example; if you have defined the below expansion and replacement sets <expansion> <sub>SUB0</sub> <sub>SUB1</sub> <sub>SUB2</sub> <sub>SUB3</sub> </expansion> <replacement> <pat>pat1</pat> <sub>SUB2</sub> </replacement> A search for term "pat1" will NOT submit a query for "SUB0","SUB1","SUB2","SUB3". You will only receive results for the term "SUB2". ~~~~~~~~~~~~~~ Materials Required ~~~~~~~~~~~~~~ Local administrator permission on SharePoint Query server Replacement and Expansion set terms in properly formed XML file per http//goo.gl/UPPLG Test files with contents of replacement terms, word, powerpoint, excel, pdf ~~~~~~~~~~~~~~ Materials Required ~~~~~~~~~~~~~~ PREP STEPS 1) copy files to target system, include thesaurus, scripts, csv of keywords, test documents Config Steps Upload query result test files with thesaurus terms to a document library within the configured crawled content source and initiate a full crawl Perform search with thesaurus synonym and show no TAILORED/BOLDED results Get access to filesystem of query server [local administrator on server] Powershell Get-SPsearchService to find path to thesaurus. The GID of the search service will be used to ID the path to the config XML [%ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Applications\GUID-query-0\Config] this may or may not be accurate, we can test by mal forming the tsneu.xml file and restarting search and looking for Event 89 Find "tsneu.xml" and make a backup (copy/paste). Rename backup to "tsneu_OG.xml" Replace with custom tsneu.xml Restart SharePoint Search Service [net stop osearch14 , net start osearch14] Perform search for test terms If error in syntax, should immediately see Event 89 in windows application log indicating Component [GUID-query-0] The global thesaurus file C\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Applications\GUID-query-0\Config\tsneu.xml has a format that is not valid. Edit the file and correct it. Use retail tracing for detailed error description. Once fixed you will need to restart search service again as in #6 Working thesaurus should return validation files, [click view duplicates to see all file results] Validation Thesaurus translation (input term -> translated search term) will be bolded directly under the URL