Sitefinity Custom PageInboundPipe

By April 6, 2015.NET, C#, Sitefinity, Web

Sitefinity search is very handy which is powered by Lucene. It indexes the pages content by rendering them in-memory – creates index named folder with files in App_Data\Sitefinity\Search. I recently had a requirement where we needed separate search indexes (let’s name them A and B). Index A needed to index all the pages except the pages under specific group page. And index B needed to index all those pages under that group page only.

Index A = All pages except pages under MyGroupPage.
Index B = All pages under MyGroupPage only.

Business requirement for the above scenario could be where one wants to allow registered users to search for private pages (under MyGroupPage) while others can for rest of them only.

This will require us to override PageInboundPipe to include / exclude set of pages based on the index name been processed. Let’s give index A and B a little more relevant names.

Index A = All (index named “All” will index all pages except the ones under MyGroupPage)
Index B = Member (index named “Member” will index pages under MyGroupPage only)

Overriding PageInboundPipe

Now register this custom pipe in bootstrapped event.

Register Custom Pipe

Hope above helps, happy coding!

The following two tabs change content below.
  • Surbhi Agarwal


    Wanted to know which version of sitefinity does it support? I am currently working on 5.4 version and wants to implement this feature on my website.