def _subjects(self, brain): """Return list of dictionary :rtype: list """ res = [] parent_brain = IAdapter(self.context).get_brain(IATFolder, path=self._path(), depth=0) parent_url = parent_brain.getURL() subjects = brain.Subject if hasattr(subjects, '__call__'): subjects = subjects() for subject in subjects: res.append({ 'title': subject, 'url': '{}?Subject={}'.format(parent_url, subject), }) return res