This package contains a Dexterity behavior and AT schemaextender to add a TAL condition on a content type.
Project description
.. image:: https://travis-ci.org/IMIO/collective.behavior.talcondition.svg?branch=master
:target: https://travis-ci.org/IMIO/collective.behavior.talcondition
.. image:: https://coveralls.io/repos/IMIO/collective.behavior.talcondition/badge.png
:target: https://coveralls.io/r/IMIO/collective.behavior.talcondition
==========================================================================
collective.behavior.talcondition
==========================================================================
This package works for dexterity (behavior) and archetypes (schema extender).
It adds two fields on a content type or class:
* tal_condition : enter a `TAL expression <http://docs.zope.org/zope2/zope2book/AppendixC.html>`_ that once evaluated will return 'True' if content should be available. Elements 'member', 'context' and 'portal' are available for the expression.
* roles_bypassing_talcondition : choose the different roles for which the TAL condition will not be evaluated and always considered \'True\'
It's then possible to use the 'evaluate' method to test the TAL condition.
How to use it
=============
For AT you have to provide the ITALConditionable on your class (see testing.zcml).
For DX you just have to activate the behavior on your content type.
Contributors
============
- Franck NGAHA, franck.o.ngaha@gmail.com
Changelog
=========
0.2 (2015-06-18)
----------------
- Added field 'role_bypassing_talcondition' to define who can bypass the condition
[anuyens]
- Added translations for new field
[gbastien]
0.1 (2015-06-01)
----------------
- Initial release.
[IMIO]
:target: https://travis-ci.org/IMIO/collective.behavior.talcondition
.. image:: https://coveralls.io/repos/IMIO/collective.behavior.talcondition/badge.png
:target: https://coveralls.io/r/IMIO/collective.behavior.talcondition
==========================================================================
collective.behavior.talcondition
==========================================================================
This package works for dexterity (behavior) and archetypes (schema extender).
It adds two fields on a content type or class:
* tal_condition : enter a `TAL expression <http://docs.zope.org/zope2/zope2book/AppendixC.html>`_ that once evaluated will return 'True' if content should be available. Elements 'member', 'context' and 'portal' are available for the expression.
* roles_bypassing_talcondition : choose the different roles for which the TAL condition will not be evaluated and always considered \'True\'
It's then possible to use the 'evaluate' method to test the TAL condition.
How to use it
=============
For AT you have to provide the ITALConditionable on your class (see testing.zcml).
For DX you just have to activate the behavior on your content type.
Contributors
============
- Franck NGAHA, franck.o.ngaha@gmail.com
Changelog
=========
0.2 (2015-06-18)
----------------
- Added field 'role_bypassing_talcondition' to define who can bypass the condition
[anuyens]
- Added translations for new field
[gbastien]
0.1 (2015-06-01)
----------------
- Initial release.
[IMIO]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for collective.behavior.talcondition-0.2.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 349ded14a1f43c63710da3a75fc59b28df50759b1396834c752016c8b2d2ecf6 |
|
MD5 | 4cffda93b3475631dc84ff2ff5c50ec5 |
|
BLAKE2b-256 | 90e3772618dda1b008b8b1b1a020191e7853e71ed5e77e1c8bba8ebe41f91a31 |