Access the parent templates block.

    {% super name %}
170059
def do_super(parser, token):
    '''
    
    '''
    name = token.strip()
    return ast.YieldFrom(
        value=_a.Call(_a.Attribute(_a.Call(_a.Name('super')), name), [
            # _a.Attribute(_a.Name('context'), 'parent'),
            _a.Name('context'),
        ])
    )
220883
function getTemplate (templates, fileName) {
  var extMatch = fileName.match(/\.([^\.]*)$/);
  if (extMatch && extMatch.length > 1)
    return templates[extMatch[1]];
  return null;
}
1244530
def get_placeholders(template_name):
    
    dummy_context.template = template.Template("")
    try:
        temp_wrapper = template.loader.get_template(template_name)
    except template.TemplateDoesNotExist:
        return []

    plist, blist = [], []
    temp = temp_wrapper.template
    _placeholders_recursif(temp.nodelist, plist, blist)

    previous = {}
    block_to_remove = []
    for block in blist:
        if block.name in previous:
            if not hasattr(block, 'has_super_var'):
                block_to_remove.append(previous[block.name])
        previous[block.name] = block

    def keep(p):
        return p.found_in_block not in block_to_remove

    placeholders = [p for p in plist if keep(p)]
    names = []
    pfiltered = []
    for p in placeholders:
        if p.ctype not in names:
            pfiltered.append(p)
            names.append(p.ctype)

    return pfiltered
426252
def select(self, template_name):
        
        return [fam for fam in self.families
                if fam.template.name == template_name][0]
605511
def root_context
      context = parent
      context = context.parent until context.is_a? Symbol
      return context
    end
1327533
private NameSpace getNonBlockParent()
    {
        NameSpace parent = super.getParent();
        if ( parent instanceof BlockNameSpace )
            return ((BlockNameSpace)parent).getNonBlockParent();
        else
            return parent;
    }
552013
def get_template(self, name):
        """"""
        source = name
        if name and name[0] is '/':
            source = name[1:]
        elif self.source is not None:
            source = '/'.join((self.source, name))
        return self.env.get_template(source)
926026
def _process_extends(self, node, **kwargs):
        

        # find all the blocks in this template
        for b in self.ast.find_all(nodes.Block):

            # if not already in `child_blocks` then this is the first time a
            # block with this name has been encountered.
            if b.name not in self.child_blocks:
                self.child_blocks[b.name] = b
            else:

                # otherwise we have seen this block before, so we need to find the last
                # super_block and add the block from this template to the end.
                block = self.child_blocks.get(b.name)
                while hasattr(block, 'super_block'):
                    block = block.super_block
                block.super_block = b

        # load the parent template
        parent_template = JinjaToJS(template_root=self.template_root,
                                    template_name=node.template.value,
                                    js_module_format=self.js_module_format,
                                    runtime_path=self.runtime_path,
                                    include_prefix=self.include_prefix,
                                    include_ext=self.include_ext,
                                    child_blocks=self.child_blocks,
                                    dependencies=self.dependencies)

        # add the parent templates output to the current output
        self.output.write(parent_template.output.getvalue())

        # Raise an exception so we stop parsing this template
        raise ExtendsException
1220131
def get_template_names(self):
        """"""
        request = self.request
        key = 'querystring_key'
        querystring_key = request.GET.get(key,
            request.POST.get(key, PAGE_LABEL))
        if request.is_ajax() and querystring_key == self.key:
            return [self.page_template or self.get_page_template()]
        return super(
            AjaxMultipleObjectTemplateResponseMixin, self).get_template_names()
201765
def template(self, name):
        
        self.plain, self.html = self._find_tpls(name)
        if not self.plain:
            self.plain = self._find_tpl(name)
        try:
            self.send = self._sendtpl
            yield
        finally:
            self.plain, self.html = None, None
            self.send = self._send
784435
@Nullable
    private ScopeBlock findPreviousSiblingScopeBlock(ScopeBlock sb) {
        ScopeBlock parent = sb.getParent();
        if (parent == null) {
            return null;
        }

        List<ScopeBlock> children = parent.getChildren();
        if (children == null) {
            return null;
        }

        ScopeBlock lastSibling = null;
        for (ScopeBlock sibling : children) {
            if (sibling.equals(sb)) {
                return lastSibling;
            }
            lastSibling = sibling;
        }

        return null;
    }
189758
private void traverseBranch(Node n, Node parent) {
    switch (n.getToken()) {
      case SCRIPT:
        handleScript(n, parent);
        return;
      case FUNCTION:
        handleFunction(n, parent);
        return;
      case MODULE_BODY:
        handleModule(n, parent);
        return;
      default:
        break;
    }
    curNode = n;
    if (!callback.shouldTraverse(this, n, parent)) {
      return;
    }

    Token type = n.getToken();
    if (type == Token.CLASS) {
      traverseClass(n);
    } else if (type == Token.CLASS_MEMBERS) {
      traverseClassMembers(n);
    } else if (useBlockScope && NodeUtil.createsBlockScope(n)) {
      traverseBlockScope(n);
    } else {
      traverseChildren(n);
    }

    curNode = n;
    callback.visit(this, n, parent);
  }
404693
def get_template_names(self):
        '''
        
        '''
        template_names = super(PageDetail, self).get_template_names()
        if self.get_object().custom_template:
            # there is a custom template, insert it before 'template_name'
            template_names.insert(0, self.get_object().custom_template)
        return template_names
363737
def _get_node(template, context, name):
    '''
    
    '''
    for node in template:
        if isinstance(node, BlockNode) and node.name == name:
            return node.nodelist.render(context)
        elif isinstance(node, ExtendsNode):
            return _get_node(node.nodelist, context, name)

    # raise Exception("Node '%s' could not be found in template." % name)
    return ""
161192
private function guessTemplateName()
	{
		if ($this->package === null) {
			throw new \RuntimeException(sprintf(
				'Block package is unknown, thus it is impossible to guess template name for block [%s].',
				$this->getTitle()
			));
		}

		$name = (new \ReflectionClass($this))->getShortName();

		if (($pos = strpos($name, 'Config')) !== false
			&& $pos === (strlen($name) - 6)) {

			$name = substr($name, 0, -6);
		}

		return $this->package->getName() . ':blocks' . DIRECTORY_SEPARATOR . Inflector::tableize($name) . '.html.twig';
	}
232858
static String getLocalTemplateName(TemplateNode node) {
    String templateName = node.getPartialTemplateName().substring(1);
    if (node.getVisibility() == Visibility.PRIVATE) {
      return "__" + templateName;
    }
    return templateName;
  }
799550
function(parent) {
    function error(usage) {
      return new Error('Template theme fields are not permitted '+ usage +':\n>>> '+ Node.toString(parent));
    }

    // Check for arguments implementation:
    if (parent.type === NodeType.ARGUMENTS) {
      throw error('as arguments');
    }

    // Check for interpolations implementation:
    if (parent.type === NodeType.INTERPOLATION) {
      throw error('in interpolations');
    }

    // Check for operations implementation:
    for (var i=0; i < parent.content.length; i++) {
      if (NodeType.OPERATOR.test(parent.content[i].type)) {
        throw error('in operations');
      }
    }
  }