Nested Wildcards to Handle Virtual Items in Sitecore

TLDR; What is the best or recommended way to work with complex virtual items at multiple levels?

I'm working on something currently that instead of using query string variables to filter properties, I would just like to extend the URL and allow those URLs to filter. Events: ~/events/2012/april or ~/events/lunches or ~/events/6CB27D08-358E-49AA-8107-16A50E963C70

I currently have a wildcard setup to handle the last case or the year but ran into the snag of a wildcard only handling one level so I'm unable to handle /events/{0}/{1} with just one wildcard. Further more, I believe that the common friendly url would end up being /events/2012/april/<external_id>_<event_name>

Using wildcards, I would need to put them three layers deep with three different layouts to handle each case from what I know currently


Is there a better way or a more recommended way to deal with complex virtual items at multiple levels?


You are on the correct path here and you are correct in that you would need a wildcard item for each segment of the URL. However, just because a wildcard exists doesn't mean you need to use it. In other words, the /events/*/* item would handle the /events/2012/april URL.

You may want to look at this blog post that leads to the Wildcard Module

Need Your Help

Python 2 list comprehension and eval

python lambda eval list-comprehension

How do you have a multiple line statement in either a list comprehension or eval?

Binary VTK for RECTILINEAR_GRID from fortran code

fortran binaryfiles vtk paraview

I am having a fortran code to generate a grid in binary VTK format. This code produces a binary VTK file like this one: