1. I am trying to edit a view.
--> For that I have copied the views-view.tpl.php file from the views module's theme folder
and placed it into my custom templates folder present inside theme folder.
--> Also I have renamed the file views-view.tpl.php file to views-view-[VIEW_NAME].tpl.php where [VIEW_NAME] is just placeholder for actual view name.
--> After this I have cleared the caches.
--> Now In my custom theme function I have a template.php file.
--> In that template.php file, I am using [THEME_NAME]preprocess[VIEW_NAME] function that is my_theme_preprocess_view_name(&$vars) function When I check the vars object I have found the following place where I need to put the html
for the field's html to change which is as follows :
which contains the html of the field I want to alter .So Using this vars variable I inserted the html as follows :
$vars['view']->result[$key]->field_name['rendered']['#markup'] = $html;
Where html is the variable which contains the altered html value for the field .
--> After this I again clear the caches. -->But the still the html value of the field does not change.
Can you please help me out on this ...
I tried doing this using hook_views_pre_render(&$vars) inside a custom module. It works
there but I wanted all the code inside the template.php file as I have read that
hook_views_pre_render() is not the proper way to alter the field value.