Earthtracker's Blog

Just another WordPress.com weblog

Expressionengine template routes for first segment with regular expression

EE has a great tool for template routing, Developer sometimes faces problem with dynamic segment routing on first segment, then we need to use regular expression using regex. I didn’t find enough details about this on EE template routing docs. So after long hours of try, solved it.

Here is the example explained:
Club name should start with club here.

If the desired url like : domain.com/club-expresso/profile/shahed


{variable:regex[(club)]}/profile/{url_title}

Simple but very much useful!

Leave a comment »