'Add items into the `items` or `templates` container depending on the
is_tpl method result.
:param items:       The items list to add.
:param index_items: Flag indicating if the items should be indexed
on the fly.'

def add_items(self, items, index_items):

    for i in items:
        if i.is_tpl():
            self.add_template(i)
        else:
            self.add_item(i, index_items)
