Selecting Related Content Items in the Sitefinity Module Builder

The Sitefinity Module builder allows you to create custom types on the fly for use as custom modules. In the 5.0 release back in February, a two new field types were added to the module builder: Guid and Array of Guids. These allow you to “link” content items using their Id properties, adding support of one-to-many and many-to-many relationships between your content.

Get the Url of a Sitefinity Page from the Guid

If you are working with the Sitefinity Pages API you can easily retrieve the Id of any page in the system. You might also be working with a custom or intra-site module, which has a static Guid property for the landing page.

Fortunately, there is an extension method in the Telerik.Sitefinity.Modules.Pages that can return the actual full url to the page.

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: