This project is read-only.

Use {Content.Slug} in Nwazet Zen Gallery path.

Topics: Customizing Orchard, Writing modules
Dec 19, 2012 at 7:52 PM

I need a few pages with text followed by an image gallery.

I created a new content type for this. It's has all the content parts of the default page, plus the Zen Gallery content part (because it's so easy to customize).

The path pattern I used is 'gallery/{Content.Slug}' (I'd like to use the slugified title as the foldername).

However, this pattern is not resolved when saving a new content item. As a result, the driver throws an exception in _mediaService.CreateFolder() (folder is null) and the content part editor is not rendered at all anymore (so there's no way to correct the path anymore).

I assume this is because {Content.Slug} is not resolved until *after* the content item is saved.

If I type in a path, save, edit, remove the path completely and save again, the pattern DOES work. Just not on the first save.

Should I give up trying to use {Content.Slug}? Or is there a way to make this work?

Dec 19, 2012 at 7:55 PM

As a first workaround, yes, I'd not use {Content.Slug}. But I think there is a bug here that needs to be fixed. I think the bug is in the Slug token, which we should be able to evaluate anytime.