Category: Pages

API Extensions Helpful Tools Pages Sitefinity

Detecting the Sitefinity Environment (Backend, Design, Preview, Edit) with the SystemManager

The Sitefinity System Manager is a helper class that simplifies working within the Sitefinity system. Although it supports several advanced operations such as loading configuration settings, registering web services, etc., it’s most helpful feature is probably the ability to report the current environment in which your code is executing.

Code Sample Content Blocks Customization Pages Sitefinity Video Widgets

Creating a Hideable Sitefinity Content Block Widget

Adding a content block to a Sitefinity page with a Content widget (such as News, Events, Blogs, etc.) displays that content for both the master list and single item details view for the content. This video demonstrates how you can easily inherit from this control to make a hideable content block that only renders when […]

API Code Sample Pages Permissions Sitefinity Widgets

Add Control to Sitefinity Page with Default Permissions

When adding controls to a Sitefinity page programmatically, by default it’s going to set restricted permissions so that only users in the Administrators role can view them. You can easily change this so that the widget is installed with the default permissions it would get by being dragged onto the page with the following code:

Code Sample Pages Sitefinity Widgets

Programmatically Adding Controls to a Sitefinity Page

The PageManager in Sitefinity has a method called CreateControl that is overloaded to allow both Compiled (dll) controls as well as simple User Controls (.ascx files) to be initialized and added to a Sitefinity page. Both overloads require a string containing the name of the ContentPlaceholder that will hold the control, which is defined in […]