Forums / Setup & design / How to fetch collected info list?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

How to fetch collected info list?

Author Message

Petter Arneson

Tuesday 09 August 2005 6:56:41 am

I have a simple newsletter subscribe form, and the email adresses entered are collected. I want to loop the content of the ezinfocollection database table to extract <b>all</b> the adresses that are entered for my newsletter. I want to do this dynamic, but the documentation states that the collection_id is required. There must be a way to do this without looping from id 1. (in case your collection starts at f.ex. 120)

Something like this:

{let collection=fetch('content','collected_info_collection',
  hash('object_attribute_id',272,'object_id',67))}

 {section loop=$collection}
  {foreach $collection.attributes}
   {$attribute.contentclass_attribute_name}<br />
   .. send email stuff... 
  {/foreach}
 {/section}

{/let}

I guess I could start from id nr 1 and check on content before proceeding if there's no workaround. Is it possible to write my own sql query in the templates?

- Thanks

www.vzt.no