I am trying to display the locality field in my custom node.tpl.php.
Normally something like print $node->field_location2['0']['value']['address']['locality'] would get the job done for normal cck fields but this is not the case with the locality field.
So does anyone know how i would go about printing the locality in my node.tpl.php?
Muchoz thanks!
Comments
Comment #1
GolDRoger commentedInstalled today and had the same need. This is how i did it:
my filed is called location
This will exatly print out what you need. If you need other fields just use this
<?php print_r($node->field_location); ?>This will print out the array with all values you can use, just check what you need and change the last part (locality, postalcode, ...)
Hope it helps.
Luke