croxton / Wires

Wire up your forms to URI segments. Search, filter sort and order entries with clean, readable uris.
7 stars 1 forks source link

mapping one segment to multiple fields #3

Closed robsonsobral closed 8 years ago

robsonsobral commented 9 years ago

Hi, Mark!

I've been mapping more than one field to the same segment.

url="/search/interval/{start_year}{start_month}{start_day}/{end_year}{end_month}{end_day}/{age_group}/{what}/{where}"

Is it possible to repopulate the fields?

Thanks!

croxton commented 8 years ago

You need a separator between the date parts e.g. {start_year}-{start_month}-{start_day}

But otherwise, yes, you can map variables like this if you wish.

croxton commented 8 years ago

Ah, beg pardon, no you can't it's one variable per segment. But your {start_year}{start_month}{start_day} could be just {start_date}

robsonsobral commented 8 years ago

Thanks, @croxton !

For now, it can't, but I solved using conditionals.

Thank you so much! This addon is so useful that I don't know how EllisLab don't make it official. Seriously. It fits really well on how EECMS works. Thanks!

croxton commented 8 years ago

You're very welcome! Glad to help.