The issue I’m coming up against is that a client’s site has a series of nested units, tasks and segments, and they want different conditionals run depending on the various segments. Now, I could use the url_title to find each url segment’s channel, but that seems like I’d potentially have too much overhead. What I’d really like to do is use the channel preferences to prefix each url_title with the channel name, and then in my conditional, query the segment in order to run various templates/changes/etc. Is there any decent way to accomplish this, or is this adding too much overhead, still?

2 Answers 2


You may also consider using Switchee

  • Wow, I hadn’t even considered that Switchee also does RegEx. That’s handy indeed! Commented Jan 14, 2013 at 16:53

If you search for SurgerEE on devotee - you'll be able to use that to query based on regular expression.

https://github.com/dsurgeons/SurgerEE/wiki/String is the function. I've used it lots of times and to really useful.

Sorry for the brevity - on the iPad and mobile at the mo.

  • Not a problem! This is a great option, for sure. Commented Jan 13, 2013 at 21:11
  • If you want some more help with the regex - let me know and I'll look tomorrow when I'm at my desk Commented Jan 13, 2013 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.