information collector templates and $collection_attributes

Author Message

Ben Peter

Tuesday 06 December 2005 12:59:20 am

Greetings,

on a custom full template for an information collecting class, I am running intro a problem with $collection_attributes.

As far as I have understood, after a form submit, this _should_ contain an array with the information collectors' attribute_ids as the keys and an ezinformationcollectionattribute Object as the value.

The keys are OK and what I would expect, but the objects are all the same: they all represent the last information collector in the class definition. The type of that last attribute does not seem to make a difference.

From how I read the collect templates in design/standard/templates/content/datatype/collect/, I need to pass in $collection_attributes with attribute_view_gui, so that a value that was entered is kept over a failed validation, but this will only work for the last field in the form.

I am using (as far as I can see) the standard approach to collect information:

- Created a new class definition which contains information collecting attributes
- Create an override template for that class, in which I am using the following code to show the form fields

{attribute_view_gui attribute=$node.object.data_map.message collection_attributes=$collection_attributes}

- Added the needed hidden fields to the form
- Created overrides for the mail and the collected info view (but these do not come into play here).

I am using eZ publish 3.7.2

Cheers,
Ben

Ben Peter

Tuesday 06 December 2005 1:02:25 pm

Just for completeness' sake: the problem is already fixed on the 3.7 branch. For those who come across this problem, have a look at. Just a small change.

http://pubsvn.ez.no/viewcvs/ezp?rev=14261&view=rev

Cheers,
Ben

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.