3

the token {contact.country} returns the full name of the country, I'd need the iso code (eg "FR" instead of "France").

Am I missing the obvious and is there a {contact.country_iso} hidden somewhere ? is there an extension that does provide this token already?

1 Answer 1

1

I'm almost certain that such a token doesn't already exist.

5
  • Thanks. Would it make sense in the core (ie. PR welcome) or should it stay as an extension IYO?
    – Xavier
    Jan 9, 2017 at 22:56
  • IMO it makes sense as an extension. It feels like it's of niche interest, and the tendency is to move things out of core these days. Jan 10, 2017 at 3:21
  • Personally can't see the problem with having more tokens added to core - there are plenty of existing tokens which are pretty niche.
    – petednz - fuzion
    Mar 10, 2017 at 20:06
  • yeap, I looked at it and doing it in the core is simple, but from an extension would need extra requests. I'm not keen on making civi even more slow by querying twice the same row
    – Xavier
    Mar 11, 2017 at 11:56
  • I think you're both making compelling points. It seems like a reasonable addition to core to avoid the "query again on every row" issue. Mar 12, 2017 at 23:02

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.