EPiServer

Hiding Content Details elements

19 April 2017 EPiServer No comments

In Edit Mode, the Content Details Panel shows information about Content Type, internal ID, roles and languages. It could be useful for administrators, but sometimes we would like to hide it for editors. Below I will describe how can we control the visibility of those elements. There are two versions of code. First shows how to hide elements for all users and second how to hide elements only for editors.
(more…)

Shortcut to a Media File

30 March 2017 EPiServer, EPiServer properties No comments

When building a menu you would probably build it based on the page tree structure, where each menu item would be a regular link to a page.

However, sometimes you would like one of the links to point to another page, a media file or an external site. Here comes the Shortcut functionality which allows you to do just that.

Content Selector for media - menu (more…)

Problem with permanent redirects shortcuts

9 January 2017 EPiServer No comments

A while ago I was struggling with permanent redirects problem. The page linked as a shortcut was not updated; always first version was used as a redirect destination. I had no idea where it could be cached. Of course at the end it turned out that the explanation of this situation is very obvious. (more…)

Trying out PropertyValueList

1 July 2016 EPiServer, EPiServer properties No comments

Since few months PropertyList<int> property is available in EPiServer. It allows to create list of blocks. List value is serialized to JSON and stored together with Page. The property doesn’t allow to work with simple types like strings or integers. An example of string list property can be found in AlloyTech demo. Editing widget is represented by textarea, so the editor needs to know that items are separated with line breaks. For other types like numbers or dates I didn’t find the implementation. That’s why I prepared PropertyValue<int> property where T is a simple type like string, integer or date.
PropertyListValue editor
(more…)

Deleting single file from trash

23 June 2016 EPiServer 7 comments

There are many situations when the solution works on Development and Test environments, but there are some problems with Production. Few times I had to create test page, check how system behaves and then delete the page. There is no Permanent Delete option for single content, so I had to empty whole trash or leave the test page. That’s why I tried to prepare functionality of deleting single file from trash.
extended trash component (more…)

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…)

ContentArea with fake items

7 June 2016 EPiServer No comments

In this article I will continue implementing page preview in ContentArea. I already have custom view which renders current page in ContentArea. The item could look better when it’s surrounded by two fake items. It will give the feeling of how the page will look like together with other elements. That’s why I decided to prepare ContentArea with fake items.
ContentArea with fake items (more…)

Rendering current page in ContentArea

4 June 2016 EPiServer No comments

In previous article I started preparing custom iframe view. For the news page I displayed teaser text. In this post I will describe how to render current page in ContentArea.
see also - current page in ContentArea (more…)

Page template preview

30 May 2016 EPiServer No comments

In one of our projects we use News page type to show the latest Company news. The news page is an article with title, image, teaser, main content and “See also” section. The section is Content Area with links to other news pages. Editor manually selects few news that should be displayed as related with currently edited news page. Each section item is rendered using custom partial page template. When editor creates news page, he doesn’t know how the page will look like in See also version. That’s why I tried to prepare news page template preview. It will be a custom edit mode view available on News Page.
see also mock (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…)