Inconsistency in matching URIs

Topics: General
Jan 9, 2012 at 3:19 PM

When you define a layer rule for a widget you can set a url like

url('/foo/bar/*')

which would match /foo/bar/baz, but not /foo/bar

The "path" attribute" of the "match" element in placement.info however (path="/foo/bar/*") would match both

/foo/bar/baz and /foo/bar

To me it doesn't make sense /foo/bar/* to match /foo/bar because there is no trailing "/". If I needed this I would go with /foo/bar* (note that there is no '/' before the *). That's how would a reg ex work too.

Jan 9, 2012 at 4:08 PM

Sounds like a bug, you should raise a workitem.

Jan 10, 2012 at 6:16 AM

From the documentation:

http://docs.orchardproject.net/Documentation/Understanding-placement-info
Path
. Scopes the contained Place tags to a specific path or to a path and its children. For example,Path="/About" enables changes that only affect the About page (assuming you have one), and Path="/MyBlog/*" affects everything that is under the path MyBlog, such as Myblog orMyBlog/FirstPost.

From this point it sounds more like it was meant to work this way. Anyway, I'll raise a new work item.