source: products/qSEOptimizer/tags/0.5.1/skins/qSEOptimizer/qSEO_Title.py @ 1

Last change on this file since 1 was 1, checked in by myroslav, 18 years ago

Building directory structure

File size: 579 bytes
Line 
1## Script (Python) "qSEO_Description"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=Generate Description from SEO properties
9##
10
11prop_name = 'qSEO_title'
12
13if context.hasProperty(prop_name):
14    return context.getProperty(prop_name)
15
16accessor = 'Title'
17
18method = getattr(context, accessor, None)
19if not callable(method):
20    # ups
21    return None
22
23# Catch AttributeErrors raised by some AT applications
24try:
25    value = method()
26except AttributeError:
27    value = None
28
29return value
Note: See TracBrowser for help on using the repository browser.