2

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.

doelleri
  • 19,232
  • 5
  • 61
  • 65
Smithfield
  • 341
  • 4
  • 11

0 Answers0