i have a content type and it stores user_email,title,body etc.
Every node has a URL alias.
How can i go through all the node, and extract the email field + the URL of that node.
any clue . thanks
i have a content type and it stores user_email,title,body etc.
Every node has a URL alias.
How can i go through all the node, and extract the email field + the URL of that node.
any clue . thanks
If you want get node of page
content type ,you can try another content types
$type = "page"; // machine name for Basic Page
$nodes = node_load_multiple(array(), array('type' => $type));
$arr=array();
foreach($nodes as $node){
arr[$node->nid]['email']= $node->field_email['und'][0]['value'];
arr[$node->nid]['url_alias']= drupal_get_path_alias('node/'. $node->nid);
}
You can get url of any particular node using this function
$alias = drupal_get_path_alias('node/102');
Getting email of any node use following statement
$node = node_load(102);
$email = $node->field_email['und'][0]['email']
Make sure I am getting these details of NodeID 102 in above example.