Back to index

plone3  3.1.7
FAQ.py
Go to the documentation of this file.
00001 # File: FAQ.py
00002 """\
00003 unknown
00004 
00005 RCS-ID $Id: FAQ.py,v 1.1 2005/04/20 15:43:37 duncanb Exp $
00006 """
00007 # Copyright (c) 2005 by unknown
00008 #
00009 # Generated: Wed Apr 20 15:10:54 2005
00010 # Generator: ArchGenXML Version 1.2 devel 3 http://sf.net/projects/archetypes/
00011 #
00012 # GNU General Public Licence (GPL)
00013 # 
00014 # This program is free software; you can redistribute it and/or modify it under
00015 # the terms of the GNU General Public License as published by the Free Software
00016 # Foundation; either version 2 of the License, or (at your option) any later
00017 # version.
00018 # This program is distributed in the hope that it will be useful, but WITHOUT
00019 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00020 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00021 # details.
00022 # You should have received a copy of the GNU General Public License along with
00023 # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00024 # Place, Suite 330, Boston, MA  02111-1307  USA
00025 #
00026 __author__  = 'unknown <unknown>'
00027 __docformat__ = 'plaintext'
00028 
00029 from AccessControl import ClassSecurityInfo
00030 from Products.Archetypes.atapi import *
00031 from Products.CMFDynamicViewFTI.fti import DynamicViewTypeInformation
00032 
00033 
00034 ##code-section module-header #fill in your manual code here
00035 ##/code-section module-header
00036 
00037 
00038 class FAQ(OrderedBaseFolder):
00039     security = ClassSecurityInfo()
00040     portal_type = meta_type = 'FAQ' 
00041     archetype_name = 'FAQ'   #this name appears in the 'add' box 
00042     allowed_content_types = ['FAQQuestion'] 
00043     _at_fti_meta_type = DynamicViewTypeInformation.meta_type
00044 
00045     __implements__ = getattr(OrderedBaseFolder,'__implements__',())
00046 
00047     ##code-section class-header #fill in your manual code here
00048     ##/code-section class-header
00049 
00050     schema=BaseFolderSchema + Schema((
00051         TextField('summary',
00052             widget=TextAreaWidget(description='Enter a value for summary.',
00053                 description_msgid='FAQ_help_summary',
00054                 i18n_domain='FAQ',
00055                 label='Summary',
00056                 label_msgid='FAQ_label_summary',
00057             ),
00058         ),
00059         
00060         TextField('introduction',
00061             widget=TextAreaWidget(description='Enter a value for introduction.',
00062                 description_msgid='FAQ_help_introduction',
00063                 i18n_domain='FAQ',
00064                 label='Introduction',
00065                 label_msgid='FAQ_label_introduction',
00066             ),
00067         ),
00068         
00069         LinesField('sections',
00070             widget=LinesWidget(description='Enter a value for sections.',
00071                 description_msgid='FAQ_help_sections',
00072                 i18n_domain='FAQ',
00073                 label='Sections',
00074                 label_msgid='FAQ_label_sections',
00075             ),
00076         ),
00077         
00078 
00079         ReferenceField('links',
00080             allowed_types=(),
00081             multiValued=1,
00082             relationship='links',
00083             versioning=True,
00084             widget=ReferenceWidget(description='Enter a value for links.',
00085                 description_msgid='FAQ_help_links',
00086                 i18n_domain='FAQ',
00087                 label='Links',
00088                 label_msgid='FAQ_label_links',
00089             ),
00090         ),
00091         
00092 
00093         ReferenceField('sectionLinks',
00094             allowed_types=(),
00095             multiValued=1,
00096             relationship='sectionLinks',
00097             widget=ReferenceWidget(description='Enter a value for sectionLinks.',
00098                 description_msgid='FAQ_help_sectionLinks',
00099                 i18n_domain='FAQ',
00100                 label='Sectionlinks',
00101                 label_msgid='FAQ_label_sectionLinks',
00102             ),
00103         ),
00104         
00105     ),
00106     )
00107 
00108     #Methods
00109 
00110 
00111     # uncomment lines below when you need
00112     factory_type_information={
00113         'allowed_content_types':allowed_content_types,
00114         'allow_discussion': 0,
00115         #'content_icon':'FAQ.gif',
00116         'immediate_view':'base_view',
00117         'global_allow':1,
00118         'filter_content_types':1,
00119         }
00120 
00121         
00122     actions=  (
00123         
00124 
00125        {'action':      '''string:$object_url/faq_view''',
00126         'category':    '''object''',
00127         'id':          'view',
00128         'name':        'view',
00129         'permissions': ('''View''',),
00130         'condition'  : 'python:1'},
00131         
00132 
00133           )
00134         
00135 
00136 registerType(FAQ)
00137 # end of class FAQ
00138 
00139 ##code-section module-footer #fill in your manual code here
00140 ##/code-section module-footer
00141 
00142