Show the review state of an item in Plone

From: Leo (lf.van.geest_at_quicknet.nl)
Date: 05/30/04


Date: 30 May 2004 07:47:04 -0700

I have the following problem:

When looking at a document, we would like to see what the review state
of that document is.

I set out to make a custom document_view page template based on the
default page template, together with some code from the
folder_contents page template.

I got the following code from folder_contents:

<td class="private"
  tal:define="review_state python:getInfoFor(item, 'review_state',
'')"
  tal:content="structure python:test(review_state, review_state,
'&nbsp;')"
  tal:attributes="class python:test(review_state,
'state-'+review_state, 'state-private')"
                        i18n:translate="">&nbsp;
</td>

and pasted somewhere after the H1 of the document_view page template
to read:

<h2
  tal:define="review_state python:getInfoFor(here, 'review_state',
'')"
  tal:content="structure python:test(review_state, review_state,
'&nbsp;')"
  tal:attributes="class python:test(review_state,
'state-'+review_state, 'state-private')"
                        i18n:translate="">&nbsp;
</h2>

that is, I changed the 'td' to 'h2' and 'item' to 'here'.

After saving the customized page template and navigating to a document
in Plone I got the following error:

Site error

This site encountered an error trying to fulfill your request. The
errors were:

Error Type
    NameError
Error Value
    name 'getInfoFor' is not defined
Request made at
    2004/05/30 16:44:04.453 GMT+2

I am using Plone 2 (the Windows binary distribution).

Any help is apreciated.

Leo.



Relevant Pages

  • Re: Automatically change title of routed file?
    ... document with a filename constructed from the string "Material Code ... > I'd like to set up a template which is a request form which needs input ... > material (solvent A). ...
    (microsoft.public.word.docmanagement)
  • Re: How do I request mail merge data?
    ... A better option would be to create a template with a combobox or listbox to display the data and from which you can select the record that you want and then click on a button to transfer that data into the document created from the template. ... and the following pages of fellow MVP Greg Maxey's website: ... how do I request the data from the spreadsheet I used as the data ...
    (microsoft.public.word.mailmerge.fields)
  • Re: IIS cert denied
    ... Start the Certificate Services service. ... Grant Read and Enroll access for the template to the appropriate user ... > I am using Server 2003 and was trying to create a new cert ... When I finish and the request is just about to be ...
    (microsoft.public.inetserver.iis.security)
  • Re: Does a method exist to Embed a long string into VB6 as a constant?
    ... I want to embed the template into the compliled code. ... The request is just ... The string can be built from simple assignments and from constants. ... The difference between the two is the handling of white space (spaces and ...
    (microsoft.public.vb.general.discussion)
  • Re: Certificate Authority Error
    ... Where do I specify which template to use? ... Jeff ... > submit a certificate request to an enterprise root CA, ... >> The request contains no certificate template information 0x80094801 ...
    (microsoft.public.windows.server.security)