Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
plone.portlets.interfaces.IPortletContext Class Reference
Inheritance diagram for plone.portlets.interfaces.IPortletContext:
Inheritance graph
[legend]
Collaboration diagram for plone.portlets.interfaces.IPortletContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getParent
def globalPortletCategories

Static Public Attributes

tuple uid

Detailed Description

A context in which portlets may be rendered.

No default implementation exists for this interface - it must be provided
by the application in order to tell the portlets infrastructure how to
render portlets.

Definition at line 21 of file interfaces.py.


Member Function Documentation

Get the portlet parent of the current context.

This is used to aggregate portlets by walking up the content hierarchy.

This should be adaptable to IPortletContext. If there is no portlet
parent (e.g. this is the site root), return None.

Definition at line 32 of file interfaces.py.

00032 
00033     def getParent():
00034         """Get the portlet parent of the current context.
00035         
00036         This is used to aggregate portlets by walking up the content hierarchy.
00037         
00038         This should be adaptable to IPortletContext. If there is no portlet
00039         parent (e.g. this is the site root), return None.
00040         """
    
Get global portlet key-value pairs, in order.

When rendered, a portlet manger (column) will be filled first by
contextual portlets (if the context and/or its parents provide
ILocalPortletAssignable), and then by global portlets. Global portlet
assignments may include portlets per user, per group, or per content
type.

This function should return a tuple of tuples where each inner tuple
contains a category such as 'user' or 'group' and the key to use in
this category. 

For example, if the current content object is a 'Document', the current 
user is 'fred' and he is a member of 'group1' and 'group2', this may
be:

(('content_type', 'Documment'),
 ('user', 'fred',),
 ('group', 'group1',),
 ('group', 'group2',),)
 
In this case, all contextual portlets may be rendered first, followed
by all global portlets in the content_type category assigned to 
'Document', followed by user portlets for 'fred' and group portlets for
'group1' and then 'group2'.

If ``placeless`` is True, the categories should only include those 
which are independent of the specific location. In this case, that
may mean that the 'content_type' category is excluded.

Definition at line 41 of file interfaces.py.

00041 
00042     def globalPortletCategories(placeless=False):
00043         """Get global portlet key-value pairs, in order.
00044         
00045         When rendered, a portlet manger (column) will be filled first by
00046         contextual portlets (if the context and/or its parents provide
00047         ILocalPortletAssignable), and then by global portlets. Global portlet
00048         assignments may include portlets per user, per group, or per content
00049         type.
00050         
00051         This function should return a tuple of tuples where each inner tuple
00052         contains a category such as 'user' or 'group' and the key to use in
00053         this category. 
00054         
00055         For example, if the current content object is a 'Document', the current 
00056         user is 'fred' and he is a member of 'group1' and 'group2', this may
00057         be:
00058         
00059         (('content_type', 'Documment'),
00060          ('user', 'fred',),
00061          ('group', 'group1',),
00062          ('group', 'group2',),)
00063          
00064         In this case, all contextual portlets may be rendered first, followed
00065         by all global portlets in the content_type category assigned to 
00066         'Document', followed by user portlets for 'fred' and group portlets for
00067         'group1' and then 'group2'.
00068         
00069         If ``placeless`` is True, the categories should only include those 
00070         which are independent of the specific location. In this case, that
00071         may mean that the 'content_type' category is excluded.
00072         """
00073         
00074 # Utility interface for registrations of available portlets


Member Data Documentation

Initial value:
schema.TextLine(title=u"A unique id or path for this specific context",
                          required=True)

Definition at line 29 of file interfaces.py.


The documentation for this class was generated from the following file: