Address display formatting

scedwar - March 18, 2008 - 20:01
Project:Address field for CCK
Version:5.x-2.1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

rconstantine - March 20, 2008 - 04:56

What 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.

#2

scedwar - March 20, 2008 - 11:00

The "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!

#3

rconstantine - March 20, 2008 - 19:34
Category:bug report» support request

#4

New Zeal - July 23, 2009 - 03:24
Status:active» closed

Addresses can be formatted using theme_cck_address()

 
 

Drupal is a registered trademark of Dries Buytaert.