Build path routing helper for pattern.