Closed (fixed)
Project:
Location
Version:
5.x-2.7
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2008 at 11:21 UTC
Updated:
6 Mar 2010 at 12:58 UTC
hi,
i am trying to access location data (lat/lon) from cck computed field
which is the proper syntax?
i tried out the following without success:
$node->locations[0]['latitude']['value']
$node->locations[0]['lat']['value']
$node->locations[0]['latitude']
$node->locations[0]['lat']
$node->locations['latitude']
$node->locations['lat']
$node->locations['latitude']['value']
$node->locations['lat']['value']
$node->location[0]['latitude']['value']
$node->location[0]['lat']['value']
$node->location[0]['latitude']
$node->location[0]['lat']
$node->location['latitude']
$node->location['lat']
$node->location['latitude']['value']
$node->location['lat']['value']
an empty string is returned...
i noticed that when location is used in blocks, load_load() is called,
however this function cannot be used inside computed field because node data is already loaded in $node and page crashes if used...
any help???
thanks!
Comments
Comment #1
jimkont commentedthis is how i finally made it work
Comment #2
yesct commentedLooks like the poster solved their problem.
Comment #4
bneel commentedHi,
I want to change lat and long data coming from the location module.
I want to do this with computed field.
Ca you explain how did your get de data into the computed field. I tried you code, but it did't work for ma. I don't know what is wrong.
Thx