https://github.com/redturtle/collective.powertoken.view
View and content access add-ons for collective.powertoken support for Plone
https://github.com/redturtle/collective.powertoken.view
Last synced: about 1 year ago
JSON representation
View and content access add-ons for collective.powertoken support for Plone
- Host: GitHub
- URL: https://github.com/redturtle/collective.powertoken.view
- Owner: RedTurtle
- Created: 2012-01-05T16:56:54.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T17:49:45.000Z (over 3 years ago)
- Last Synced: 2025-02-19T17:09:57.834Z (over 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
Introduction
============
A "view document" action implementation for `collective.powertoken`__
__ http://plone.org/products/collective.powertoken.core
How to use
==========
Add this product to your Plone installation, then you will be able to register Power Tokens that
"view" document.
>>> from collective.powertoken.core.interfaces import IPowerTokenUtility
>>> utility = getUtility(IPowerTokenUtility)
>>> token = utility.enablePowerToken(document, 'view.viewDocument')
>>> results = utility.consumeActions(document, token)
>>> print results
You will get the view output as result.
Parameters
----------
``view``
Call a different Zope view on the context, not the current or default ones.
``cmfcallable``
Call a CMF Template/skins resource on the context
``setToRequest``
A dict with additional values to set in the request. For example you can set ``disable_border``, or
(only for Plone 4) ``disable_plone.leftcolumn`` and ``disable_plone.rightcolumn``.
All parameters are not mandatory. Providing none of theme will call the content default view, without addind
anything new to the request.
Use case
========
* You can view a document, regardless of it's review state and your roles in the site.
* You can call a view on a context, overriding the user security permission.
Authors
=======
This product was developed by RedTurtle Technology team.
.. image:: http://www.redturtle.it/redturtle_banner.png
:alt: RedTurtle Technology Site
:target: http://www.redturtle.it/