Container ItemDisplayUrl issues


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

Closed Jul 7, 2013 at 12:26 AM by sebastienros


sebastienros wrote Mar 19, 2013 at 9:28 PM

Repro ?

sebastienros wrote Mar 19, 2013 at 9:29 PM

Let me try it

Jetski5822 wrote Jun 9, 2013 at 9:00 AM

did you try?

sebastienros wrote Jul 7, 2013 at 12:26 AM

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.