SaaS CMS has officially launched! Learn more now.

Multiple page selector


I'd like to create a property that allows an editor to select multiple pages instead of just that one you get if you choose a "Page" property. Any experience from doing something like that?

May 19, 2014 3:34

Have you looked at this blog post ?

May 19, 2014 9:53

Couldn't the built in LinkCollection be used?

May 19, 2014 10:47

Completely forgot about LinkCollection. Thanks, Petter!

May 19, 2014 19:44

Is the issue Resolved ? Actually the LinkItemCollection is not actually matches to my  requirement .I want to select multiple items in Sitemap itself by using pagereference ...How ? Please suggest ? 

Is there is any ready available property for me 

Jul 30, 2016 19:56

Linkitemcollection was the way to go earlier but requires some extra work to get to the actual ContentReference. Now you can also use the new ContentReferenceList property type. 

Edited, Jul 31, 2016 12:42

What about a ContentArea? Also add the AllowedTypes attribute

[AllowedTypes(AllowedTypes = new [] { typeof(PageData })]

Jul 31, 2016 15:16

...or the old school trick with a special container pagetype that contains the items you need (probably a special link page type for you with a single content reference as a target) and then point out the container with a content reference where you want to use it. Mostly useful if you might expand the model for the links to contain additional information. Then you can simply add that to the specialized page type for the links. 

Jul 31, 2016 16:39

Many Thanks for your swift responses . I have been through the suggestions one by one 

@ Daniel @Alf : Suggested to go with the  ContentReferenceList property , but the problem is the user have to select the one page after the other ,instead of all at once . Also the UI of the ContentReferenceList doesnot feel good. (Screen 1 ) . Please correct me if iam wrong. 

Actually what iam looking for is selecting multiple pages as in (Screen 2)

Screen 1 :


Screen 2 :

Aug 01, 2016 9:44

When i try with Ilist<PageReference>, i get this below  run time error . Why ? Where the same works with Ilist<ContenetReference>

Server Error in '/' Application.

Type 'System.Collections.Generic.IList`1[[EPiServer.Core.PageReference, EPiServer, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]]' could not be mapped to a PropertyDefinitionType

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: EPiServer.Core.TypeMismatchException: Type 'System.Collections.Generic.IList`1[[EPiServer.Core.PageReference, EPiServer, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]]' could not be mapped to a PropertyDefinitionType

Aug 01, 2016 12:44

Is there any other ideas or updates to me . Requirement in simple is that to select the required Pages at a once.Is there is any limitation in episerver for this ?

Aug 04, 2016 20:36

Hi Sharoze!

Try using a IList of ContentReference and apply the AllowedTypes attribute to filter it down to pages only. It should be possible to apply an IList of PageReferences as well, but it is much more complex to do since you need to register this both with the core and the UI.

[AllowedTypes(new Type[] { typeof(PageData) })]
public virtual IList<ContentReference> PageList { get; set; }
Aug 10, 2016 16:05

Hi Linus 

Many Thanks for your reply !!!

I would like to go with LinkItemCollection .But i am unable to use the    [AllowedTypes(typeof(PageType))]  .The issue which iam getting is Allowed Types is not for Link ITEM Collection .Then what should i use to solve the issue . 

Please help me in resolving the issue . 

Aug 10, 2016 16:48


Using the latest Nuget packages, this works fine. I even get a little nice indication that only pages are valid:

Try updating your packages to see if that solves your problem.

Aug 10, 2016 16:56

Hi Linus , 

The one which you have showed up is IList<ContentReference>  . But iam referring to   LINKITEMCOLLECTION .

Also , Iam unable to save any custom proerty , is this is a known issue ?

Aug 10, 2016 19:18


The link item collection is, as the name states, a list of links. Think of this as URL:s, not internal references to other objects in Episerver. Of course, you can link to any object in Episerver that has a public URL. The link item collection has been somewhat used for referencing other objects in Episerver, but after the content reference list was introduced, there should be no need for this. Please try using a content reference list.

As to custom properties, Episerver needs to know each property type. By default, Episerver registers a number of different types, both primitives and also more complex types like ContentArea. If you want to create your own custom properties, you can read this information:

Please note that this is a pretty advanced subject that also requires you to either registester meta data for editing and also potentially creating your own custom editor. I would avoid this unless I had very specific needs and a budget that allowed for quite some time in this area.

Aug 15, 2016 3:09
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.