How can eliminate menu shorcuts "create new mymodule" and "edit button" display grid
any can help me i try read all source of my module but no can when...
i like module read view database any can help me?
please thanks.
How can eliminate menu shorcuts "create new mymodule" and "edit button" display grid
any can help me i try read all source of my module but no can when...
i like module read view database any can help me?
please thanks.
To remove the "Create new mymodule" link you need to create an extended menus for your module:
custom/Extension/modules/<MyModule>/Ext/Menus/menu.ext.php
Containing something like that:
To remove the edit link from Listview you need to:PHP Code:<?php
//WARNING: The contents of this file are auto-generated
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
global $mod_strings, $app_strings, $sugar_config;
foreach($module_menu as $key=>$menu_option){
if($menu_option[2] == 'CreateMyModule'){
unset($module_menu[$key]);
}
}
?>
create a custom view.list.php
implement the method preDisplay containing something like that:
create the script custom/include/ListView/ListViewNoEdit.php containing the class ListViewNoEdit, which extends the default ListViewSmarty;PHP Code:function preDisplay(){
require_once('custom/include/ListView/ListViewNoEdit.php');
$this->lv = new ListViewNoEdit();
}
implement the method process containing something like that:
CheersPHP Code:function process($file, $data, $htmlVar) {
$data['pageData']['access']['edit'] = false;
$this->rowCount = count($data['data']);
$this->moduleString = $data['pageData']['bean']['moduleDir'] . '2_' . strtoupper($htmlVar) . '_offset';
}
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
I bro Thanks for you time and help, i can modificate shorcuts create perfect, but no can´t in edit button
i create ListViewNoEdit.php in path custom\include\ListView\
and call in MyModule_sugar.php and view.list.php thisPHP Code:class ListViewNoEdit extends ListViewSmarty {
function process($file, $data, $htmlVar) {
$data['pageData']['access']['edit'] = false;
$this->rowCount = count($data['data']);
$this->moduleString = $data['pageData']['bean']['moduleDir'] . '2_' . strtoupper($htmlVar) . '_offset';
}
}
but view.list.php no locate the path for put where?PHP Code:function preDisplay(){
require_once('custom/include/ListView/ListViewNoEdit.php');
$this->lv = new ListViewNoEdit();
}
thanks!
You need to create the view.list.php inside custom/modules/<MyModule>/views.
The content may looks like that:
PHP Code:<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/MVC/View/views/view.list.php');
class MyModuleViewList extends ViewList {
function preDisplay(){
require_once('custom/include/ListView/ListViewNoEdit.php');
$this->lv = new ListViewNoEdit();
}
}
?>
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks