Grails URL Mappings using name for multiple adress

82 Views Asked by At

I'm looking for good practice or a shorter way to write my "Named" Grails URL mapping.

I'd like to write (especially to ease the internationalization process) this in UrlMappings.groovy:

            name shop:['/shop','/boutique','/winkel','/geschaft']/$slug?
                controller = 'entry'
                namespace= 'shop'
                action='pageslug'
                constraints {
                    slug(matches: /^[a-zA-Z0-9_]*$/)
                }

So all those addresses become valid mapping in one step. Would also be interested in any good practice tips to write such case in the shortest way.

0

There are 0 best solutions below