3

I've got a site with several locales and want to reuse a set of categories across locales but want to target a locale specific template from within each.

Is it possible to set a locale-specific path within the category group settings, eg

{{ craft.locale }}/_video

Cheers,

Cole

1
  • This is probably one for your routes.php. Depending on how you would want to structure your URLs. Another quick way around could be to use a shared template to include the correct template Oct 14, 2015 at 8:52

1 Answer 1

2

It looks like this isn't possible. But what you can do instead is either:

  • Route them to a shared template using the category settings and use include programatically:

    {% include 'myCatTemplate--' ~ craft.locale %}
    
  • Disable "Categories in this group have their own URLs" in the category settings and add your own dynamic routes.

1
  • Thanks - not really looked into dynamic routes before. Seems like a good opportunity to investigate further! Oct 14, 2015 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.