[Product-Developers] Getting a vocabulary from /portal_properties
Espen Moe-Nilssen
espen at medialog.no
Fri Mar 18 16:08:44 UTC 2011
Hi
In a schema this is the vocabulary:
vocabulary=SimpleVocabulary([
SimpleTerm('image_mini', 'image_mini', u"Mini"),
SimpleTerm('image_preview', 'image_preview', 'Preview'),
SimpleTerm('image_large', 'image_large', 'Large')
])
_____________
I want to "drag in the settings from "image_properties", which are usually something like this:
large 768:768
preview 400:400
mini 200:200
____
So basically, I need to read the first word of each line, then add "image_" to it and hopefully convert the first letter to uppercase.
Is there a smart way to do this? or do I have to read one and one line, then store the first word add it with "image_" ? etc.
Espen
More information about the Product-Developers
mailing list