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

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

  • Thanks. Would it make sense in the core (ie. PR welcome) or should it stay as an extension IYO? – Xavier Jan 9 '17 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. – Jon G - Megaphone Tech Jan 10 '17 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 '17 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 '17 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. – Jon G - Megaphone Tech Mar 12 '17 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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