def _left(self):
        featured_content = IProjectsFolder(self.context).get_featured_content()
        yield self.atomic(
            'project',
            fraglet(fragletPath=".",
                    fragletShowTitle=False,
                    fragletShowDescription=True,
                    fragletShowSummary=True,
                    fragletShowThumbnail=True,
                    itemShowSummary=True,
                    itemShowDescription=True,
                    itemShowGraphic='mini',
                    listingMaxItems=-1))

        if not featured_content:
            yield self.atomic(
                'projects',
                fraglet(fragletPath=".",
                        fragletShowTitle=False,
                        fragletShowDescription=False,
                        fragletShowSummary=False,
                        fragletShowThumbnail=False,
                        itemShowSummary=False,
                        itemShowDescription=True,
                        itemShowGraphic='thumb',
                        listingMaxItems=0,
                        listingBatchItems=3))
        else:
            for project in featured_content:
                yield self.atomic(
                    'project-%s' % project,
                    fraglet(fragletPath=project,
                            fragletShowTitle=True,
                            fragletShowDescription=True,
                            fragletShowSummary=False,
                            fragletShowThumbnail=True,
                            itemShowSummary=True,
                            itemShowDescription=True,
                            itemShowGraphic='thumb',
                            listingMaxItems=-1))

        yield self.atomic(
            'support-us',
            fraglet(fragletPath="/about/support-us",
                    fragletShowTitle=True,
                    fragletShowDescription=True,
                    fragletShowSummary=False,
                    fragletShowThumbnail=False,
                    itemShowTitle=True,
                    itemShowIcon=False,
                    itemShowSummary=False,
                    itemShowDescription=True,
                    itemShowGraphic='tile',
                    listingBatchResults=False))
    def _left(self):
        featured_projects = IProjectsTopic(self.context).get_featured_projects()

        yield self.atomic(
            "project",
            fraglet(
                fragletPath=".",
                fragletShowTitle=False,
                fragletShowDescription=True,
                fragletShowSummary=True,
                fragletShowThumbnail=True,
                itemShowSummary=True,
                itemShowDescription=True,
                itemShowGraphic="mini",
                listingMaxItems=-1,
            ),
        )

        if not featured_projects:
            yield self.atomic(
                "projects",
                fraglet(
                    fragletPath=".",
                    fragletShowTitle=False,
                    fragletShowDescription=False,
                    fragletShowSummary=False,
                    fragletShowThumbnail=False,
                    itemShowSummary=True,
                    itemShowDescription=True,
                    itemShowGraphic="mini",
                    listingMaxItems=0,
                    listingBatchItems=True,
                    listingItemsPerPage=3,
                ),
            )
        else:
            for project in featured_projects:
                yield self.atomic(
                    "project-%s" % project,
                    fraglet(
                        fragletPath=self._project_path(project),
                        fragletShowTitle=True,
                        fragletShowDescription=True,
                        fragletShowSummary=True,
                        fragletShowThumbnail=True,
                        itemShowSummary=True,
                        itemShowDescription=True,
                        itemShowGraphic="mini",
                        listingMaxItems=-1,
                    ),
                )
 def _right(self):
     projects = IProjectsTopic(self.context).get_projects_folder()
     topics = projects.get_projects_topics()
     for topic in topics:
         yield self.atomic(
             topic,
             fraglet(
                 fragletPath=self._project_path(topic),
                 fragletShowTitle=False,
                 fragletShowDescription=False,
                 fragletShowSummary=False,
                 fragletShowThumbnail=False,
                 fragletCssClass="tall-box",
                 listingBatchResults=True,
                 listingItemsPerPage=7,
                 itemShowTitle=True,
                 itemShowIcon=True,
                 itemShowGraphic="tile",
                 itemShowSummary=False,
                 itemShowDescription=True,
                 itemShowDownloadLink=True,
             ),
             hidden=True,
         )
     yield self.atomic("project-topics", multi_portlet(dict(portlets=topics, portlet_type="tabbed")))
 def _left(self):
     yield self.atomic(
         'project-summary',
         fraglet(fragletPath=self._project_path(),
                 fragletShowTitle=False,
                 fragletShowDescription=True,
                 fragletShowSummary=True,
                 fragletShowThumbnail=True,
                 listingMaxItems=-1))
     features = self._project().Schema(
         )['project_features'].get(self._project())
     for feature_path in features:
         yield self.atomic(
             'project-%s' % os.path.basename(feature_path),
             fraglet(fragletPath=feature_path,
                     fragletShowTitle=True,
                     fragletShowDescription=True,
                     fragletShowSummary=True,
                     fragletShowThumbnail=True,
                     listingMaxItems=-1))
 def _bottom(self):
     yield self.atomic(
         'partners',
         fraglet(fragletPath="/about/partners-funders",
                 fragletShowTitle=True,
                 fragletShowDescription=False,
                 fragletShowSummary=False,
                 fragletShowThumbnail=False,
                 fragletCssClass='floatedBoxes',
                 itemShowTitle=False,
                 itemShowSummary=False,
                 itemShowDescription=False,
                 itemShowGraphic='tile',
                 listingBatchResults=False))
 def _bottom(self):
     partners = self.project.get_project_folder('partners')
     if partners and partners.contentIds():
         yield self.atomic(
             'project-partners',
             fraglet(
                 fragletPath=self._project_path('partners'),
                 fragletShowTitle=False,
                 fragletShowDescription=False,
                 fragletShowSummary=False,
                 fragletShowThumbnail=False,
                 fragletCssClass='floatedBoxes',
                 listingBatchResults=True,
                 listingItemsPerPage=5,
                 itemShowTitle=False,
                 itemShowIcon=False,
                 itemShowGraphic='thumb',
                 itemShowSummary=False,
                 itemLinkDirectly=False,
                 itemShowDescription=False))
    def _right(self):
        yield self.atomic(
            'project-info',
            portlet_project_info.Assignment(path=self._project_path())
            )

        frag_paths = []
        excluded_folders = ['partners', 'media', 'info']
        for folder in self.project.get_project_folders(non_empty=True):
            if len(frag_paths) < 3:
                if not folder in excluded_folders:
                    frag_paths.append(folder)
            else:
                break

        mf = []
        subs = []
        for path in frag_paths:
            news = IProjectNews(
                self.project.get_project_folder(path), None)
            events = IProjectEvents(
                self.project.get_project_folder(path), None)
            css_class = 'overlayFragletItems medium-tall-box'
            fraglet_dict = dict(fragletPath=self._project_path(path),
                                fragletShowTitle=True,
                                fragletShowDescription=False,
                                fragletShowSummary=False,
                                fragletShowThumbnail=False,
                                fragletCssClass=css_class,
                                listingBatchResults=True,
                                listingItemsPerPage=5,
                                itemShowTitle=True,
                                itemShowIcon=True,
                                itemShowGraphic='tile',
                                itemShowSummary=False,
                                itemShowDescription=True,
                                itemShowDownloadLink=True)
            
            if events:
                fraglet_dict['itemProperties'] = 'timespan\nlongdate'
            if news:
                fraglet_dict['itemProperties'] =\
                    'effective: Published: $PROP\nCreator: by $PROP'
            subportlet = path.split('/')[-1]
            subs.append(subportlet)
            yield self.atomic(
                subportlet,
                fraglet(**fraglet_dict),
                hidden=True
                )
        yield self.atomic(
            'project-listings',
            multi_portlet(dict(portlets=subs,
                               portlet_type='tabbed')))

        media = self.project.get_project_folder('media')
        if media and media.contentIds():
            yield self.atomic(
                'project-media',
                fraglet(
                    fragletPath=self._project_path('media'),
                    fragletShowTitle=True,
                    fragletShowDescription=False,
                    fragletShowSummary=False,
                    fragletShowThumbnail=False,
                    fragletCssClass='overlayFragletItems',
                    listingBatchResults=True,
                    listingItemsPerPage=5,
                    itemShowTitle=True,
                    itemShowIcon=True,
                    itemShowGraphic='tile',
                    itemShowSummary=False,
                    itemLinkDirectly=False,
                    itemShowDescription=True,
                    itemShowDownloadLink=True))
    def _right(self):
        projects = IProjectsFolder(self.context)
        topics = projects.get_projects_topics()

        yield self.atomic(
            'site-contacts',
            fraglet(fragletPath="/about/contact",
                    fragletShowTitle=True,
                    fragletShowDescription=False,
                    fragletShowSummary=False,
                    fragletShowThumbnail=False,
                    itemShowDescription=False,
                    listingMaxItems=4,
                    ))

        yield self.atomic(
            'topics',
            multi_portlet(dict(portlets=topics,
                               portlet_type='tabbed')))

        for topic in topics:
            yield self.atomic(
                topic,
                fraglet(
                    fragletPath=self._project_path(topic),
                    fragletShowTitle=True,
                    fragletShowDescription=False,
                    fragletShowSummary=False,
                    fragletShowThumbnail=False,
                    fragletCssClass='tall-box',
                    listingBatchResults=True,
                    listingItemsPerPage=5,
                    itemShowTitle=True,
                    itemShowIcon=True,
                    itemShowGraphic='tile',
                    itemShowSummary=False,
                    itemShowDescription=True,
                    itemShowDownloadLink=True),
                hidden=True)

        # this needs cleaning up and moving!
        names = {'/events/upcoming': 'Events',
                 '/about/news/latest': 'News'}

        yield self.atomic(
            'latest',
            multi_portlet(dict(portlets=names.values(),
                               portlet_type='tabbed')))
        
        for path in ['/about/news/latest',
                     '/events/upcoming',]:
            yield self.atomic(
                names[path],
                fraglet(
                    fragletPath=path,
                    fragletShowTitle=False,
                    fragletShowDescription=False,
                    fragletShowSummary=False,
                    fragletShowThumbnail=False,
                    fragletCssClass='tall-box overlayFragletItems',
                    listingBatchResults=True,
                    listingItemsPerPage=5,
                    itemShowTitle=True,
                    itemShowIcon=True,
                    itemShowGraphic='tile',
                    itemShowSummary=False,
                    itemShowDescription=True,
                    itemShowDownloadLink=True),
                hidden=True)