function renderedpage($args){
if($args['template'] == 'mail'){
$content = $args['content'];
$content = $content // How to edit this part to add a label in the messagetoolbar div..??
$args['content'] = $content;
}
return $args;
}
I need to add a label in the toolbar. I found that i have to edit messagetoolbar div in the template 'mail'..
I need to know how to edit this inside the function..??
Say i need to add Undo label to the toolbar..
Thanks and Regards,
Pratik
Its easiest to add it with javascript, see an example here: http://trac.roundcube.net/wiki/Doc_Plugins#ClientscriptsandUIelements
I stumbled to that part but i need that value to change everytime. How to pass the value to JavaScript for display..??
So i thought that will be more appropriate..
any idea how to do it by this method..??
can't i select a particular div and add to it.??
You can pass a variable to JavaScript by using the set_env function, like:
$rcmail->output->set_env('button_value', 'data');
Then in the Javascript access it by calling rcmail.env.button_value, like:
alert(rcmail.env.button_value);
Alternatively you could try using the template_container hook Plugin_Hooks ? Roundcube Webmail (http://trac.roundcube.net/wiki/Plugin_Hooks#TemplateHooks)
Thanks a lot that was very helpful.. It worked as i needed.. Cheers mate..