E-Democracy Pages Wiki

Search Wiki

 

Tools

 

Difference between revisions of "Page Components"

From E-Democracy.org

(Created page with "=Content Providers= Content providers are indivisible content displays or widgets - the providers of content and structure for complete components (e.g. a post) that can be incl...")
 
(Summary of page components)
Line 1: Line 1:
 +
Zope and GroupServer provide a sophisticated set of components and classes for building web pages. This set consists of widget like content providers and viewlet, to form building/handling classes, to general web page containers.
 +
 +
This set, in addition to [[Zope Templates]], provides the tools a developer needs to display information and create user interfaces on E-Democracy.
 +
 
=Content Providers=
 
=Content Providers=
  
Line 7: Line 11:
 
While quite common in GroupServer, these are mostly being phased out in favor of the more flexible Viewlets and Viewlet Managers.
 
While quite common in GroupServer, these are mostly being phased out in favor of the more flexible Viewlets and Viewlet Managers.
  
==gs.viewlet.contentprovider.SiteContentProvider==
+
==Site Content Provider==
  
[[https://source.iopen.net/groupserver/gs.viewlet/files/tip/gs/viewlet/contentprovider.py Source]
+
[https://source.iopen.net/groupserver/gs.viewlet/files/tip/gs/viewlet/contentprovider.py gs.viewlet.contentprovider.SiteContentProvider]
  
 
The base for content providers used on a site. It is simply an object with knowledge of the context, request, and view. It provides the following properties:
 
The base for content providers used on a site. It is simply an object with knowledge of the context, request, and view. It provides the following properties:
Line 16: Line 20:
 
* loggedInUser - A groupserver.LoggedInUser instance
 
* loggedInUser - A groupserver.LoggedInUser instance
  
==gs.group.base.contentprovider.GroupContentProvider==
+
==Group Content Provider==
 +
 
 +
[https://source.iopen.net/groupserver/gs.group.base/files/tip/gs/group/base/contentprovider.py gs.group.base.contentprovider.GroupContentProvider]
  
 
Base for content  providers that are intended to be used in a group. This is a subclasses of SiteContentProvider, and provides the following properties that are relevant for groups:
 
Base for content  providers that are intended to be used in a group. This is a subclasses of SiteContentProvider, and provides the following properties that are relevant for groups:
Line 23: Line 29:
 
* viewTopics - Indicates if the user has permission to view topics in the group.
 
* viewTopics - Indicates if the user has permission to view topics in the group.
 
* isAnnouncement - Indicates if the group is an announcement group.
 
* isAnnouncement - Indicates if the group is an announcement group.
 +
 +
[[Category:Technology:GroupServer Development Reference]]

Revision as of 10:26, 26 February 2013

Zope and GroupServer provide a sophisticated set of components and classes for building web pages. This set consists of widget like content providers and viewlet, to form building/handling classes, to general web page containers.

This set, in addition to Zope Templates, provides the tools a developer needs to display information and create user interfaces on E-Democracy.

Content Providers

Content providers are indivisible content displays or widgets - the providers of content and structure for complete components (e.g. a post) that can be included as part of an overall page (e.g. the topic display page).

Most Content Providers are declared in an egg's configure.zcml to have a name, a class, a template, and maybe a factory or adaptor. Content Providers are included on pages by using the tal:replace or tal:content tags and the structure

While quite common in GroupServer, these are mostly being phased out in favor of the more flexible Viewlets and Viewlet Managers.

Site Content Provider

gs.viewlet.contentprovider.SiteContentProvider

The base for content providers used on a site. It is simply an object with knowledge of the context, request, and view. It provides the following properties:

  • siteInfo - A groupserver.SiteInfo instance
  • loggedInUser - A groupserver.LoggedInUser instance

Group Content Provider

gs.group.base.contentprovider.GroupContentProvider

Base for content providers that are intended to be used in a group. This is a subclasses of SiteContentProvider, and provides the following properties that are relevant for groups:

  • groupInfo - A groupserver.GroupInfo instance.
  • viewTopics - Indicates if the user has permission to view topics in the group.
  • isAnnouncement - Indicates if the group is an announcement group.
 

Home - Mobile - Forums - Wiki - Blog - About - Help - Contact - People - Donate - Rules - Archives