[Plone-UI] editing the bodyClass method

ida277 contact at ida-ebkes.eu
Mon Jul 11 11:15:15 UTC 2011


In Plone 3 you can customize the getSectionFromUrl.py script like this, to
get an unlimited depth of generated classes (like
"section-folder-subfolder-subsubfolder, f.e):

contentPath = context.portal_url.getRelativeContentPath(context)
if not contentPath:
    return ''
else:
    return " ".join(["section-" + "-".join(contentPath[:d+1]) for d in
range(len(contentPath))])

Haven't tried in Plone 4 yet and don't know about possible performance
downsides, but hth.

Best,
Ida

--
View this message in context: http://plone.293351.n2.nabble.com/editing-the-bodyClass-method-tp6570437p6570543.html
Sent from the User Interface & Design mailing list archive at Nabble.com.


More information about the UI mailing list