how to add partial hbs file inside master hbs file in sugarcrm

36 views Asked by At

My goal is to show multiple pages like wizard inside a popup in sugarcrm . solution i seems is to added partial .hbs file inside master hbs file .

i have gone through documentation

https://support.sugarcrm.com/documentation/sugar_developer/sugar_developer_guide_12.2/user_interface/handlebars/

  1. Create a Handlebars helper file
`(function(app) {
    app.events.on("app:init", function() {

        Handlebars.registerHelper("customUpperCase", function (text)
        {
            return text.toUpperCase();
        });

    });
})(SUGAR.App);`
  1. create a JSGrouping extension
`foreach($js_groupings as $key => $groupings) {
    foreach($groupings as $file => $target) {
        if ($target == 'include/javascript/sugar_grp7.min.js') {
            //append the custom helper file
            $js_groupings[$key]['custom/JavaScript/my-handlebar-helpers.js'] = 'include/javascript/sugar_grp7.min.js';
        }

        break;
    }
}`
  1. use your custom helpers in the HBS files by using:
`
  {{customUpperCase "MyString"}} `

But this is not working , and it only passing string in hbs file , i want to add full html or php page in hbs

i also tried iframe or include 'example.php' in hbs file , but it hangs in sugarcrm . what is correct way to add multiple child pages in one hbs file

0

There are 0 answers