Thursday, October 31, 2013

Partial Page Exclusion in SharePoint Search

Background:

Out of the box search results in SharePoint shows unnecessary data such as navigation, left nav, footer, right nav etc., that may not be useful to end user. Fortunately, it’s easy to exclude those items from appearing in search results by using a technique called “Partial Page Exclusion”.

How to use:

Just include a class called “noindex” for the items that needs to be excluded from search results. This tells the crawler to ignore those items. Here is a sample example in which crawler is forced to crawl only content present in body class. All other items are ignored.

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div class="wrapper">
<div class="header noindex">
// Header Data
</div>
<div class="topnav noindex">
// Navigation
</div>
<div class="body">
// Header Data
</div>
<div class="footer noindex">
// Footer Data
</div>
</div>
</body>

</html>

Wednesday, September 25, 2013

Error Publishing Content Type: No valid proxy can be found to do this operation

Hi All,

Below is the error we faced when trying to publish a content type from content type hub:

"No valid proxy can be found to do this operation"

















Resolution:

Make sure that on content type hub (source), Content Type Syndication Hub site collection feature is activated.










Thanks :)

Tuesday, August 20, 2013

SharePoint 2013 IFrame: This HTML cannot be inserted because this type of content is not allowed.

Hi All,

We got below error when trying to embed a IFrame in SharePoint 2013 Page (Edit Page > Embed Code)

IFrame code:

<iframe src="http://www.w3schools.com" width="600" height="400"></iframe>

and the error:

















Resolution:

Go to Site Settings > Site Collection Administration > HTML Field Security



























In "Allow iframes from this domain" section, add http://www.w3schools.com  and click OK as shown below:













Once this is done, the site is displayed properly in IFrame as shown below:























Hope this helps someone out there :)