def items(self): portal_state = self.context.restrictedTraverse('plone_portal_state') root_url = portal_state.navigation_root_url() membership = getToolByName(self.context, 'portal_membership') home_url = membership.getHomeUrl() return [{ 'available': True, 'title': _(u'The Finnish Association for Nature Conservation'), 'url': 'http://www.sll.fi/', }, { 'available': not home_url, 'title': PloneMessageFactory(u'Log in'), 'url': '{}/login'.format(root_url), }, { 'available': home_url, 'title': SLTPolicyMessageFactory(u'Orders'), 'url': home_url, }]
def items(self): portal_state = self.context.restrictedTraverse('plone_portal_state') root_url = portal_state.navigation_root_url() membership = getToolByName(self.context, 'portal_membership') home_url = membership.getHomeUrl() return [ { 'available': True, 'title': _(u'The Finnish Association for Nature Conservation'), 'url': 'http://www.sll.fi/', }, { 'available': not home_url, 'title': PloneMessageFactory(u'Log in'), 'url': '{}/login'.format(root_url), }, { 'available': home_url, 'title': SLTPolicyMessageFactory(u'Orders'), 'url': home_url, } ]
def title(self): """Title shown in @@manage-portlets""" return _(u"Member")