plone.stringinterp 1.0.6

Adaptable string interpolation

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in plone.stringinterp 1.0.6:

  • Added parent_url substitution (the url of the object parent). [thomasdesvenain]
Read full changelog
send us
an update
LICENSE TYPE:
GPL (GNU General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Plone Foundation
HOMEPAGE:
pypi.python.org
CATEGORY:
ROOT \ Internet \ Plone Extensions
plone.stringinterp provides ${id} style string interpolation using named adapters to look up variables. This is meant to provide a trivially simple template system for clients like plone.app.contentrules.

To interpolate a string in context, just follow the pattern:

from plone.stringinterp.interfaces import IStringInterpolator

IStringInterpolator(context)("Here is the title: ${title}")


Substitution of variables that are part of the Dublin Core are provided with the package. To provide additional subsitutions, just provide a named adapter implementing interfaces.IStringSubstitution for your context. The adapter name is used for the lookup.

Dependencies

Dependencies are all in the CMF* namespace, so this theoretically useful outside Plone. It does use the 'plone' identifier for the message factory.

Last updated on August 6th, 2012

requirements

#string interpolation #Plone extension #Plone #string #interpolation #adapters

Add your review!

SUBMIT