This entry was posted on Saturday, January 7th, 2012 at 9:36 pm and is filed under Tech Stuff. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
The method for Programmatically setting a link field value (see the Link module) in drupal 7 is slightly different from how it was set it in drupal 6. Here is some code for creating a new node and setting its link field (called field_url):
$node->type = ‘website’;
$node->title = $site_name;
$node->language = LANGUAGE_NONE;
$node->field_url[$node->language]['title'] = “www.ridgesolutions.ie”;
$node->field_url[$node->language]['url'] = “www.ridgesolutions.ie”;