Hello all,
I am pretty new to roundcube plugin development, I am working on a project that demanded me to create a custom plugin, I have figured out how to access the database code from my custom plugin, but where I am stuck is that how to pass this data to the template for display? The template code is in HTML, I tried writing some PHP scripts in it but it didn't work. What I need to be able to do is that display the set of records that have been fetched from the database in the plugin file in its template. I found nowhere a good tutorial or documentation for doing the same and I am posting my request here.
Any help would be greatly appreciated...
Have you read the plugin documentation?
Plugin documentation: http://trac.roundcube.net/wiki/Doc_Plugins
Plugin hooks: http://trac.roundcube.net/wiki/Plugin_Hooks
Skin documentation: http://trac.roundcube.net/wiki/Doc_SkinML
Thank you for your reply, yes I have checked the links, but I have all the database data in an associative array in the plugin file, I don't know how to display the contents of the array in the template file..
Are you trying to:
1. display a table of data on a complete new page
2. modify an existing page
3. load the data on an existing page dynamically (i.e. after a button is clicked)
Currently I am trying to display the data from the database in a completely new page. I have also a requirement to display the data on an existing page dynamically further in the project. So, these two are my scenarios.
Then read the Templates section in the plugin documentation http://trac.roundcube.net/wiki/Doc_Plugins#Templates its walks through adding the handler and using the roundcube:object tag to access it.