Andopes,
Thank you very much for your response. I am still very unsure of what I am doing. I have created the "view.list.php" in my custom\modules\Contacts\views directory. Then I created a new class within the view.list.php file as shown below.
Code:
class NewViewList extends listViewSmarty
{
function NewViewList()
{
parent::listViewSmarty();
}
} I am unsure of what I do next. do I add a function along the lines of:
Code:
function process($file, $data, $htmlVar)
{
parent::process($file, $data, $htmlVar) ;
if (isset($_REQUEST['module']) && ($_REQUEST['module']=='Contacts')
{
$this->ss->assign('WebServiceLink', $this->buildWebServiceLink($this->data['pageData']['offsets']['total']));
}
} this does not seem to do anything? Do I need to recreate the whole view.list.php file or can i just do
require_once('include/MVC/View/views/view.list.php');?
Currently I am just testing sugar so i went and edited the actual files just to see if i could add another button.
I opened ListViewDisplay.php and added the function
Code:
function buildWebServiceLink($totalCount)
{
global $app_strings;
$script = '<input class="button" type="button" value="WebService" onclick="">'; return $script;
} I then went into ListViewSmarty.php and added this to the function process
Code:
if($_REQUEST['module']=='Contacts')
{
$this->ss->assign('WebServiceLink', $this->buildWebServiceLink($this->data['pageData']['offsets']['total']));
} and finally i altered ListViewPagination.tpl to have {$WebServiceLink} below {$composeEmailLink}
this does generate a button but i'm guessing is not upgrade safe. Can you give me a little more detail on this process? Are there any tutorials on this?
Bookmarks