Example #1
0
def registerSlotExprType():
    # Register the 'slot:' expression type.

    # Register with Products.PageTemplates.
    try:
        from Products.PageTemplates.Expressions import getEngine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        engine = getEngine()
        if not engine.getTypes().has_key('slot'):
            engine.registerType('slot', SlotExpr)

    # Register with zope.tales.
    try:
        from zope.tales.engine import Engine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        if not Engine.getTypes().has_key('slot'):
            Engine.registerType('slot', SlotExpr)
Example #2
0
def registerSlotExprType():
    # Register the 'slot:' expression type.

    # Register with Products.PageTemplates.
    try:
        from Products.PageTemplates.Expressions import getEngine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        engine = getEngine()
        if not engine.getTypes().has_key('slot'):
            engine.registerType('slot', SlotExpr)

    # Register with zope.tales.
    try:
        from zope.tales.engine import Engine
    except ImportError:
        log.exception("Unable to register the slot expression type")
    else:
        if not Engine.getTypes().has_key('slot'):
            Engine.registerType('slot', SlotExpr)
Example #3
0
def registerTALESExpressionType(name, handler):
    Engine.registerType(name, handler)
Example #4
0
def register(name, handler):
    """Register tales expression type."""
    Engine.registerType(name, handler)
Example #5
0
def registerTALESExpressionType(name, handler):
    Engine.registerType(name, handler)