EPiServer properties

Adding random items to ContentArea

15 June 2016 EPiServer, EPiServer properties No comments

In one of our projects we have News page type. It has a “see more” section with links to other news pages. When editor is creating New page, he adds few articles to “see more” section. In some situations he would like to pick few random pages. I extended ContentArea with adding random items functionality.
Adding random items to ContentArea (more…)

TextArea with statistics

22 May 2016 EPiServer, EPiServer properties No comments

For the plain text like introductions or short descriptions we use TextArea property. It could be useful for editor to see how many characters and words he already typed. It gives an overview of how much space for new value is required. That’s why I decided to implement property TextArea with statistics.
TextArea with statistics
(more…)

How to disable creating new blocks in Content Area

18 May 2016 EPiServer, EPiServer properties 1 comment

In some scenarios we would like to disable creating new blocks functionality on Content Areas. Then editors will add only existing items using drag and drop functionality. We could implement one of few solutions to meet this requirement. It can be EditorDescriptor with client widget or quick hack enclosed in 10 lines of backend code.
Content Area no create new link
(more…)

How to render line breaks for string property

13 May 2016 EPiServer, EPiServer properties 2 comments

In one of out projects I had a requirement to prepare a multiline text property that supports line breaks. It had to be a standard textarea field with no HTML elements just plain text with new line support. The dojo editor didn’t require changes, because line breaks were stored during saving property data. Only value renderer had to be implemented.
TextArea editor
(more…)

Client module with server side parameters

25 April 2016 EPiServer, EPiServer properties No comments

Few weeks ago I described how to extend Tools menu with additional Move to trash command. Trash button was displayed only for News pages. For all other page types button was not displayed. What if we need to show the button also on the Article type? We could add another hardcoded Page Type condition to dojo component. It will work but it sounds like a fragile solution. It would be better to store all supported types on the server and send serialized settings to the client module.
server available types (more…)

Updated ContentArea with images

25 March 2016 EPiServer, EPiServer properties No comments

Few months ago I prepared extended version of ContentArea property widget. Editors can use it to preview item thumbnail. In EPiServer 9 the ContentArea widget implementation changed so I updated extension to support the newest version. The UI is the same as before – each item displays content name and image thumbnail, to see larger image we need to click on the element.

ContentArea editor with image preview
(more…)

Creating Dojo widget in TypeScript

21 January 2016 EPiServer, EPiServer properties 4 comments

Episerver edit mode use Dojo framework as a client side technology. When creating new custom property, gadget or command button we should use this JavaScript library to prepare user interface. To have static typing and class-based object-oriented programming I tried to create Dojo widget in TypeScript. In this article I will describe how to develop Alloy demo example StringList property in TypeScript. (more…)

PropertyList with images

22 December 2015 EPiServer, EPiServer properties 4 comments

The PropertyList is the new property introduced in EPiServer 9. It allows to use generic list on content model. List item property could be described with the same attributes as regular model properties. For example if we annotate property with Display attribute and set name, then name will be used as grid column header and as a label on the edit form. If we set the UiHint, like StringList then editing form will use selected editor. (more…)

Changing root for Content References property

4 December 2015 EPiServer, EPiServer properties No comments

EPiServer has a builtin Content References list property which is used to collect list of pages, blocks, or media. To add new reference, editor could D&D content or click Browse. Clicking Browse button will show dialog with content tree. (more…)

How to show Allowed types on Content Area

16 November 2015 EPiServer, EPiServer properties 2 comments

ContentArea property has builtin functionality of limiting content types that could be used in the editor. It’s implemented with AllowedTypes attribute. The attribute should be placed on the model and list all of available types. (more…)