Exemple #1
0
    def collection_url(self):
        collection = self.collection()
        if collection is None:
            return None

        if self.data.show_more == 'direct':
            return collection.absolute_url()

        else:
            collectionpath = "/".join(collection.getPhysicalPath())
            
            context = Acquisition.aq_inner(self.context)
            if not context.isPrincipiaFolderish:
                context = Acquisition.aq_parent(context)
            contextpath = "/".join(context.getPhysicalPath())
            return "%s/@@oshtopic-view?tp=%s" % (context.absolute_url(), collectionpath)
    def collection_url(self):
        collection = self.collection()
        if collection is None:
            return None

        if self.data.show_more == 'direct':
            return collection.absolute_url()

        else:
            collectionpath = "/".join(collection.getPhysicalPath())

            context = Acquisition.aq_inner(self.context)
            if not context.isPrincipiaFolderish:
                context = Acquisition.aq_parent(context)
            contextpath = "/".join(context.getPhysicalPath())
            return "%s/@@oshtopic-view?tp=%s" % (context.absolute_url(),
                                                 collectionpath)
Exemple #3
0
    def collection_url(self):
        collection = self.collection()
        if collection is None:
            return None


        collectionpath = "/".join(collection.getPhysicalPath())
        
        context = Acquisition.aq_inner(self.context)
        if not context.isPrincipiaFolderish:
            context = Acquisition.aq_parent(context)
        contextpath = "/".join(context.getPhysicalPath())
        
        # If the shown collection is within the current context, reference it directly
        if collectionpath.startswith(contextpath):
            return collection.absolute_url()
        # If the collection is in a different place in the site, use the proxy view
        else:
            return "%s/@@oshtopic-view?tp=%s" % (context.absolute_url(), collectionpath)
Exemple #4
0
    def collection_url(self):
        collection = self.collection()
        if collection is None:
            return None

        collectionpath = "/".join(collection.getPhysicalPath())

        context = Acquisition.aq_inner(self.context)
        if not context.isPrincipiaFolderish:
            context = Acquisition.aq_parent(context)
        contextpath = "/".join(context.getPhysicalPath())

        # If the shown collection is within the current context, reference it directly
        if collectionpath.startswith(contextpath):
            return collection.absolute_url()
        # If the collection is in a different place in the site, use the proxy view
        else:
            return "%s/@@oshtopic-view?tp=%s" % (context.absolute_url(),
                                                 collectionpath)