5
  • This is my file which was contain template 'website_fb.fb_shared_post'

     Qweb.add_template('website_fb_redertemplate.xml');
    
  • Below code through create a website side widget so now if call this widget then how to do.
  • I refer the Odoo documentation but nothing to understandable for me so please help me.

    var RenderTemplate = Widget.extend({
         template: 'website_fb.fb_shared_post',
         events: {
         // DO some code
         },
        init: function (el) {
         // DO some code
         },
        start: function () {
        // DO some code
         }
      });
    

1 Answers1

3

First, when you create widget it will automatically render above XML file that you mention in the first line so below line render another widget template XML file

  $(Qweb.render("fb_shared_post", {'res':'Hello'})).prependTo('<TemplateDivID or Class>');
Jainik Patel
  • 2,284
  • 1
  • 15
  • 35