Tuesday, October 26, 2010

Views Change edit link, delete icon into edit and delete icon

Edit Link
Create tpl file with the name "views-view-field--edit-node.tpl.php" inside ur theme directory and write the following code into it.
-----
$output = preg_replace(
'#(]*>)[^<]*()#',
"$1". theme_image(path_to_theme(). '/images1/pics/edit.png') ."$2",
$output
);
print $output;
-----


?>
Delete Link -Same as above Filename: "views-view-field--delete-node.tpl.php" inside ur theme directory
$output = preg_replace(
'#(]*>)[^<]*()#',
"$1". theme_image(path_to_theme(). '/images1/pics/delete.png') ."$2",
$output
);
print $output;


No comments:

Post a Comment