World is now on Opti ID! Learn more


May 1, 2012
  2658
(0 votes)

ElencySolutions.MultipleProperty v1.5.1 Released

A few days ago I released a new version of my multiple property assembly.  The previous version basically allowed you to set a default value for properties and also added some functionality which enabled you to turn on and off various list based buttons such as edit, delete etc.  The button toggling changes came about because of some customizations a colleague of mine had to make for a client.

Unfortunately I made some assumptions about what he was trying to do and didn’t give him what he wanted (note to self do some requirements gathering up front).  So I give you v1.5.1.

New Features/Bug Fixes

  • Copy as new button will no longer allow you to add more items to the list than the set maximum number of items.
  • New IMultiplePropertyEntityAbilityOverride interface.
  • New IMultiplePropertyEntityCollectionAbilityOverride interface.

Making use of the new ability override interfaces

You’re entity classes can now implement the IMultiplePropertyEntityAbilityOverride interface.  The interface has the following methods:

- bool AllowEdit(PageData pageData, string propertyName);
- bool AllowDelete(PageData pageData, string propertyName);

Within your entity you can then define any custom logic to determine whether the edit and delete buttons can be enabled.

For entity collections List<TEntity> you can implement the IMultiplePropertyEntityCollectionAbilityOverride interface.  This interface has the following methods:

- bool AllowAdd(PageData pageData, string propertyName);
- bool AllowEdit(PageData pageData, string propertyName);
- bool AllowDelete(PageData pageData, string propertyName);

This enables you to define custom logic to determine whether add, edit or delete functionality should be enabled across the whole list rather than an individual entity level.

Installation

The easiest way to install the assembly is by installing it from the EPiServer nuget feed (once it has been made available).  But if you are not down with the cool kids you can download it from codeplex.  The assembly is built for EPiServer CMS 6 and onwards.

On the codeplex site you can also find some useful documentation and example code to get you familiar with what the property offers.  The example code is dependent on PageTypeBuilder.

Feedback

As always feedback is greatly appreciated, if you have any suggestions for new features or changes I am happy to hear them.

Just twitter me @croweman or send me an email Smile

May 01, 2012

Comments

Please login to comment.
Latest blogs
Make Global Assets Site- and Language-Aware at Indexing Time

I had a support case the other day with a question around search on global assets on a multisite. This is the result of that investigation. This co...

dada | Jun 26, 2025

The remote server returned an error: (400) Bad Request – when configuring Azure Storage for an older Optimizely CMS site

How to fix a strange issue that occurred when I moved editor-uploaded files for some old Optimizely CMS 11 solutions to Azure Storage.

Tomas Hensrud Gulla | Jun 26, 2025 |

Enable Opal AI for your Optimizely products

Learn how to enable Opal AI, and meet your infinite workforce.

Tomas Hensrud Gulla | Jun 25, 2025 |

Deploying to Optimizely Frontend Hosting: A Practical Guide

Optimizely Frontend Hosting is a cloud-based solution for deploying headless frontend applications - currently supporting only Next.js projects. It...

Szymon Uryga | Jun 25, 2025

World on Opti ID

We're excited to announce that world.optimizely.com is now integrated with Opti ID! What does this mean for you? New Users:  You can now log in wit...

Patrick Lam | Jun 22, 2025

Avoid Scandinavian Letters in File Names in Optimizely CMS

Discover how Scandinavian letters in file names can break media in Optimizely CMS—and learn a simple code fix to automatically sanitize uploads for...

Henning Sjørbotten | Jun 19, 2025 |