Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Johan Björnfot
May 7, 2010
  4287
(0 votes)

PageProvider capabilities

There has been some questions regarding why capabilities for a page provider are set through configuration rather than that the provider itself declares its capabilities through code.

First, it is possible to “ignore” the configured capabilities in your provider implementation. That is possible since you can override the virtual property Capabilities in PageProviderBase.

There is however a reason why capabilities are set through configuration rather than code. The reason is that there are some occasions where it is desirable to have the provider configured with less capabilities than it “technically” supports. One such scenario is when you have a setup with an dedicated editor site and other “read-only” public sites (just delivering content). In those cases it is practical to configure the page provider with no capability (same as read-only) on the read-only sites. Then the UI will automatically prohibit edit on those sites. And also if some code (e.g. through some web or wcf service) would try to edit content on that site it would throw NotSupportedException.

You can use this “feature” even if you are not using any custom page provider by declaring following in the config files for the “read-only” sites:

<pageprovider>
   <providers>
     <add name="default" type="EPiServer.LocalPageProvider,EPiServer" /> 
</providers>
 </pageprovider>

In that case the “read-only” site will run with the normal built in EPiServer page provider serving pages from the episerver database but the pages will not be editable through that site.

May 07, 2010

Comments

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog