def METHOD_NAME(self, request):
    """Returns a list of items to pass to a template for rendering."""
    if not self.condition(request):
        return []
    items = self._get_all_registered_items(request)
    context_items = []
    for item in sorted(items, key=attrgetter('order')):
        if item.condition(request):
            attrs_str = ' '.join(
                [
                    '%s="%s"' % (escape(k), escape(v))
                    for (k, v) in item.attrs.items()
                ]
            )
            attrs_str = mark_safe(attrs_str)
            context_items.append(
                dict(
                    url=item.url_generator(request),
                    text=item.text,
                    attrs=attrs_str,
                    has_icon=self.show_icons,
                )
            )
    return context_items