Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions | Static Private Attributes
plone.app.portlets.portlets.news.Renderer Class Reference
Inheritance diagram for plone.app.portlets.portlets.news.Renderer:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.portlets.news.Renderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def render
def available
def published_news_items
def all_news_link
def update

Public Attributes

 context
 request
 view
 manager
 data

Private Member Functions

def _data

Static Private Attributes

tuple _template = ViewPageTemplateFile('news.pt')

Detailed Description

Definition at line 44 of file news.py.


Member Function Documentation

Definition at line 70 of file news.py.

00070 
00071     def _data(self):
00072         context = aq_inner(self.context)
00073         catalog = getToolByName(context, 'portal_catalog')
00074         limit = self.data.count
00075         state = self.data.state
00076         return catalog(portal_type='News Item',
00077                        review_state=state,
00078                        sort_on='Date',
00079                        sort_order='reverse',
00080                        sort_limit=limit)[:limit]

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 59 of file news.py.

00059 
00060     def all_news_link(self):
00061         portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
00062         portal_url = portal_state.portal_url()
00063         portal = portal_state.portal()
00064         
00065         if 'news' in portal.objectIds():
00066             return '%s/news' % portal_url
00067         else:
00068             return None

By default, portlets are available

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 53 of file news.py.

00053 
00054     def available(self):
00055         return len(self._data())

Here is the call graph for this function:

Definition at line 56 of file news.py.

00056 
00057     def published_news_items(self):
00058         return self._data()

Here is the call graph for this function:

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 49 of file news.py.

00049 
00050     def render(self):
00051         return xhtml_compress(self._template())

Here is the call graph for this function:


Member Data Documentation

tuple plone.app.portlets.portlets.news.Renderer._template = ViewPageTemplateFile('news.pt') [static, private]

Definition at line 46 of file news.py.

Reimplemented in plone.app.portlets.portlets.classic.Renderer.

Definition at line 75 of file base.py.

Reimplemented in plone.app.portlets.portlets.classic.Renderer.

Definition at line 80 of file base.py.

Definition at line 79 of file base.py.

Definition at line 76 of file base.py.

Definition at line 77 of file base.py.


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