Represents a restructed text based Help Topic which has other filename extension then '.stx'.
>>> from zope.app.onlinehelp.tests.test_onlinehelp import testdir >>> path = os.path.join(testdir(), 'help.stx')
Create a Help Topic from a file
>>> topic = STXOnlineHelpTopic('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 stx, since the file extension is 'stx'
>>> topic.type 'zope.source.stx'
Test the help content.
>>> topic.source.splitlines()[0] u'This is a STX 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'
id
(type:
unicode
)
u''
interface
(type: NoneType
)
None
parentPath
(type:
unicode
)
u''
path
(type:
unicode
)
u''
source
(type:
property
)
<property object at 0x40d3e784>
title
(type:
unicode
)
u''
type
(type:
str
)
'zope.source.stx'
view
(type: NoneType
)
None
addResources(resources)
see IOnlineHelpTopic
get(key, default=None)
See interface IReadContainer
getSubTopics()
getTopicPath()
See IOnlineHelpTopic
has_key(key)
See interface IReadContainer
items()
See interface IReadContainer
keys()
See interface IReadContainer
values()
See interface IReadContainer
There are no known subclasses.