2015-02-06 70 views
2

我需要爲自定義模塊創建嚮導。這是通過使用例如容易在https://www.sugaroutfitters.com/blog/creating-a-layout-and-view-for-a-module-in-sugarcrm-7如何將標準字段添加到SugarCRM的自定義佈局7

創建自定義佈局,

$viewdefs['mymodulename']['base']['layout']['wizard'] = array(
    'type' => 'simple', 
    'components' => 
    array(
     array(
      'view' => 'wizard', 
     ), 
    ), 
); 

HBS-模板

{{> wizard.header }} 
<div class="tcenter"> 
    Step 1 
    <br/><br/> 
    <button class="previousStep btn btn-success">Previous</button> 
    <button class="nextStep btn btn-success">Next</button> 
</div> 
{{> wizard.footer }}" 

和控制器:

({ 
    className: 'mymodulename-wizard  
... 

是否可以添加和在t上使用標準的SugarCRM字段(下拉列表,日曆,貨幣,相關字段等)他的自定義佈局,就像在標準記錄視圖中一樣,通過使用元數據或其他方式?或者一定需要在我的自定義hbs-template中創建自定義控件?

回答

0

是的,雖然您需要在模板中使用{{field}} Handlebars helper來插入它們。

要查看如何使用現場幫手的示例,請參閱Sugar 7.5中的dashablelist.hbspreview.hbs

相關問題