Class
zope.app.onlinehelp.onlinehelptopic.RESTOnlineHelpTopic

Represents a restructed text based Help Topic which has other filename extension then '.rst' or 'rest'.

>>> from zope.app.onlinehelp.tests.test_onlinehelp import testdir
>>> path = os.path.join(testdir(), 'help.rst')

Create a Help Topic from a file

>>> topic = RESTOnlineHelpTopic('help','Help',path,'')

Test the title

>>> topic.title
'Help'

Test the topic path

>>> topic.getTopicPath()
'help'
>>> topic.parentPath = 'parent'
>>> topic.getTopicPath()
'parent/help'

The type should be set to rest, since the file extension is 'rest'

>>> topic.type
'zope.source.rest'

Test the help content.

>>> topic.source.splitlines()[0]
u'This is a ReST help!'
>>> u'\u0444\u0430\u0439\u043b' in topic.source
True

Resources can be added to an online help topic.

>>> topic.addResources(['test1.png', 'test2.png'])
>>> topic['test1.png'].contentType
'image/png'
>>> topic['test2.png'].contentType
'image/png'

Base classes

Implemented Interfaces

Attributes/Properties

Methods

Known Subclasses

There are no known subclasses.