title: Override Marionette.Region's getEl method in Backbone.Marionette
body: <p>I've set up a project where I've extended a <code>Backbone.Marionette.Layout</code> that contains two different regions. This layout can be used as a component throughout the application. In particular, the regions are set up like the following.</p>
  
  <pre><code>regions : {
      masterRegion : { selector: '[data-region=master]' },    
      slaveRegion: { selector: '[data-region=slave]' }
  },
  </code></pre>
  
  <p>In particular, I'm using a <code>data-region</code> selector to inject the view I'm interested in.</p>
  
  <p>When such a layout is used in a tree structure views are duplicated since <code>getEl</code> function adresses the wrong region to inject the view. Obviously it's my fault and within <code>Marionette</code> (v1.1.0) doc the following is written.</p>
  
  <blockquote>
    <p>override the getEl function if we have a parentEl this must be
    overridden to ensure the selector is found on the first use of the
    region. if we try to assign the region's el to parentEl.find(selector)
    in the object literal to build the region, the element will not be
    guaranteed to be in the DOM already, and will cause problems</p>
  </blockquote>
  
  <p>where <code>getEl</code> is defined as</p>
  
  <pre><code>getEl: function(selector){
      return Marionette.$(selector);
  }
  </code></pre>
  
  <p>So, my question is the following. What does this mean? How can I override this method? Where is the correct to perform such an override?</p>
  
  <p>Hope it's clear.</p>