Try our conversational search powered by Generative AI!

Lee Crowe
May 1, 2012
(1 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.


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.


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


May 4, 2012 02:03 PM

Nice one thats just what I was looking for

Jun 11, 2012 03:00 PM

How can I get this one to run under CMS 6 R2? The dll is compiled for an older version op Episerver CMS...

Jun 11, 2012 03:03 PM

Hi Ronald

A standard CMS 6 R2 build will have some assembly binding redirects in the web.config to redirect to the latest version of the assemblies so you should not need to do anything.

If this is a big issue and you need it compiling against CMS 6 R2 you can download the source from codeplex and recompile it.


Jun 11, 2012 03:35 PM

Hi Lee,

Thanks for the very quick response! What do you mean with the assembly redirects? Could you show me an example how to do that? By default it generates an standard error referring to:

"Could not load file or assembly 'EPiServer, Version=6.0.530.0,....." etc..


Jun 11, 2012 03:37 PM

Hi Ronald

Example below, these will be added to your web.config with a default CMS 6 R2 install.


Jun 11, 2012 03:51 PM

Hmm I already recompiled the DLL and that seems to work. Thanks for this solution as well.
Now when I'm checking the custom properties list, it only shows 'FakeProperty', but not a 'MultipleProperty'. Should I add that one manually?

Thanks again,

Jun 11, 2012 03:54 PM

Hi Ronald

FakeProperty is the only out of the box property you get and it is a hack to fix some issues with composer, you never need to directly use it.

To understand how to make use of the assembly please refer to this documentation

The example on the downloads page may also be useful as you can add it to your alloy tech site and get used to it.


Jun 11, 2012 04:03 PM

Ah ok, so I need to create all the entities and properties through code. And how can I bypass PTB, since I don't want to use it?

Jun 11, 2012 04:12 PM

Hi Ronald

Yep all entities and properties need creating in code.

The example uses PTB but you do not have to use it.

Out of interest why don't you want to use PTB?


Jun 11, 2012 04:16 PM

We want to have the flexibility to create templates online, not through the code of a programmer. We also had several problems with synchronizing templates (combined with sourcecontrol etc.) so we chose to skip it. I did hear that the new version of Episerver will have similar functionality as PTB.

Jun 11, 2012 04:19 PM

By the way to be able to create templates online, we needed more work, so now we can also generate the other part of the template through use of a Razor syntax, so now we don't need a programmer to create templates. Pretty neat, and one of the things missing, from an otherwise excellent CMS!

Jun 11, 2012 04:30 PM

Anyway, got it to work! Thanks very much.

One very last question, in the documentation it's possible to change the settings through MultiplePropertyEntityAttribute. Things like 'AddButtonText' I would love to use, but am not sure where and how to put this code.

Jun 11, 2012 04:44 PM

You would decorate your entity class with the MultiplePropertyEntityAttribute, this has various properties that can be set.


[MultiplePropertyEntity(AddButtonText = "Add)]
public class Image

Please login to comment.
Latest blogs
Build a headless blog with Astro and Optimizely SaaS CMS

I’m a big fan of using the right tool for the right job. I’m also a big fan of Astro , for the right use case. Let's explore Astro to see what it's...

Jacob Pretorius | May 28, 2024

Microsoft announces Natural language to SQL

Finally, Microsoft launches "Natural language to SQL," after it has been available for several months in Optimizely CMS!

Tomas Hensrud Gulla | May 23, 2024 | Syndicated blog

Five easy ways to start personalizing your content right now

If you clicked on this article, you already know that getting the right message to the right person at the right time helps drive conversions and...

Kara Andersen | May 23, 2024

ExtendedCms.TinyMceEnhancements – serwer side webp support

Today I will introduce another small feature of TinyMceEnhancements plugin. The functionality is used to automatically detect whether a browser...

Grzegorz Wiecheć | May 22, 2024 | Syndicated blog