I have content type in which I have two or three links .In node.tpl.php, all links are displaying from a single variable "$links" in node.tpl.php. i want to remove one particular link from the "$links" variable by preprocess function and assign that link to a new variables , so i can display it where ever I want.
I created a preprocess function to implement it
function sample_preprocess_node(&$variables){
if($variables['type']="product"){
$node=$variables['node'];
$create_review=array();
$create_review=$node->links['review_field_product_review'];
$variables['create_review']=$create_review;
unset($node->links['shopping_review_field_shopping_product_review']);
}
}
and I pasted the following code in node.tpl.php
print $create_review;
It displays "array" in product page and that particular link is not removed from the variable ($links) in node.tpl.php
Can you tell me how to remove the particular link from the "$link " variable in node.tpl.php and display it by another variable in node.tpl.php?