
Forum (Content Type)
====================

Forum content types is container (folder), that can contains also other Forum
content types that automaticaly become subfolder. As also shown bellow Forum
content type can also contain Topic content type.

In this example we'll show how can we create forum that has one main Forum
container where other subforums are added. Subforum will also be categorized
by custom categories defined in main Forum conainer.

Main Forum container is as normal Forum content type. "allow_addtopic" option
gives us control whether we want users to be able to add topics inside our
Forum. This limitation is browser only.

    >>> self.setRoles(['Manager'])
    >>> self.portal.invokeFactory('Forum', 
    ...     id = 'forum',
    ...     title = 'Forum',
    ...     categories = ['Category 1', 'Category 2', 'Category 3'],
    ...     allow_addtopic = False)
    'forum'

Lets create two subforums. 'First Subforum' and 'Second Subforum'

    >>> forum = getattr(self.portal, 'forum')
    >>> forum.invokeFactory('Forum',
    ...     id = 'first-subforum',
    ...     title = 'First Subforum',
    ...     category = 'Category 2')
    'first-subforum'
    >>> forum.invokeFactory('Forum',
    ...     id = 'second-subforum',
    ...     title = 'Second Subforum')
    'second-subforum'

'First Subforum' should be in 'Category 2' and 'Second Subforum' should not be
in any category.

    >>> first_subforum = getattr(forum, 'first-subforum')
    >>> first_subforum.category
    'Category 2'
    >>> second_subforum = getattr(forum, 'second-subforum') 

Lets check catalog custom metadata values. 

   >>> forum.forum_topics()
   0
   >>> forum.forum_posts()
   0
   >>> forum.forum_category() == forum.category
   True
   >>> from DateTime import DateTime
   >>> forum.modified() == DateTime('1990/01/01')
   True
   >>> forum.Subject() == ['', '']
   True


