1

Closed

Container ItemDisplayUrl issues

description

Say I have a new ContentType which I give a Container Part, when I display the Content Item all the nice Urls I have added using Url.ItemDisplayUrl are now

/Containers/Item/Display/ID
Closed Jul 6, 2013 at 11:26 PM by sebastienros

comments

sebastienros wrote Mar 19, 2013 at 8:28 PM

Repro ?

sebastienros wrote Mar 19, 2013 at 8:29 PM

Let me try it

Jetski5822 wrote Jun 9, 2013 at 8:00 AM

did you try?

sebastienros wrote Jul 6, 2013 at 11:26 PM

This part is redefining the DisplayRoute metadata in its handler. It's necessary as it will add paging so it can't use the default Contents/Items/Display one.

The issue is that the AliasRoute is already registered to map Contents/Items/Display to the slug, but when it is summoned, it doesn't find any match because now it's the container's route which is requested.

The workaround is to publish the content items you have added this part to.

The alternative would be to process every content items once a part is attached but this would add some overhead for everyone despite being a problem for very few.