[Zope] TAL and Plone
NathanDunn@ctimi.com
NathanDunn@ctimi.com
Wed, 24 Jul 2002 15:06:14 -0400
The following snip lists all the contents of the root folder:
<table class="listing"
tal:condition="here/contentValues">
<tbody>
<metal:block
tal:repeat="obj python:here.listFolderContents()">
<tr class="even"
tal:condition="python:
obj.portal_membership.checkPermission('View', obj)"
tal:define="oddrow repeat/obj/odd"
tal:attributes="class python:test(oddrow, 'even', 'odd')" >
<td>
<img src="#" tal:attributes="src string:
${obj/absolute_url}/${obj/getIcon}" />
<a href="#" tal:attributes="href string:
${obj/absolute_url}/view"
tal:content="obj/title_or_id" />
</td>
</tr>
</metal:block>
</tbody>
</table>
However, I would like to only list those items with "VIEW" permissions. I
thought thats what the expression:
tal:condition="python: obj.portal_membership.checkPermission('View', obj)"
would do.
Any ideas?
Zope newbie with a deadline!
Nathan
--
NOTICE: This e-mail message and all attachments transmitted with it may
contain legally privileged and confidential information intended solely
for the use of the addressee. If the reader of this message is not the
intended recipient, you are hereby notified that any reading,
dissemination, distribution, copying, or other use of this message or
its attachments, hyperlinks, or any other files of any kind is strictly
prohibited. If you have received this message in error, please notify
the sender immediately by telephone (865-218-2000) or by a reply to this
electronic mail message and delete this message and all copies and
backups thereof.