Closed (fixed)
Project:
Address field for CCK
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2008 at 20:01 UTC
Updated:
23 Jul 2009 at 03:24 UTC
Using the simple display controls for cck output (not themeing, these content types are too simple to bother), the address is output like this:
Address:
10 Downing Street
LondonW1 123 UK
This is just ugly. Can the default be set to make sure there is at least a space, and preferably a carriage return to make the address it look like this:
Address:
10 Downing Street
London W1 123
UK
or
Address:
10 Downing Street
London
W1 123
UK
Thanks, Stephen
Comments
Comment #1
rconstantine commentedWhat field is W1? I'm not sure why there isn't a space between London and W1. Is that part of your postal code? It seems to me there should be a space there in the standard theme. As for the other ideas, that's great for the UK, but not for the USA. What I am thinking of is extending the theme functions so that the sub-modules could define their own. That way India, Spain, UK, etc. could each have their own themes and do as you suggest. Until that happens, you'll have to just override, or edit the original.
Comment #2
scedwar commentedThe "W1 123" is stored in the zip code (postal code in the UK). Either of the second or third forms of address would be acceptable in the UK. The main thing is that 'country' should be separate on the last line and I can't think of a country I've come across where that isn't the convention. Postal codes, however, are a whole other matter!
Comment #3
rconstantine commentedComment #4
NewZeal commentedAddresses can be formatted using theme_cck_address()