127 Posts
Cappu
10 years ago
3
Topic
Hi,

I do have a List Type where I do iterate through entries of my content type. Now I want to remove duplicate tags entries out of my list.

As far as I know, I can use the "BeforeRender" Code to manipulate each an every entry. -

I somehow cannot figure out where to store the result of calculations on a single entry to use it on the next entry and
to use it to finally print out my calculated string.

Thanks for any help.

Best

Bernhard
Get a VIP membership
127 Posts
Cappu
10 years ago
0
Level 1
Well, after some thinking I guess the "BeforeRender" isn't the best way to do calculations on all values at once of a List Types. - Maybe a Plugin would be much better. - Something like the "Search Total"?! -

Thanks for any opinion on that topic.

10 years ago
0
Level 1
Hi Cappu,

I don't really get what you mean with remove duplicate tags from the list. If you can illustrate this more, maybe someone can come up with an idea.

From what I understand looking at the index.php of seb_table template, you can get all items that are returned by the search with
$items     =   $cck->getItems();
This willl return an array of items.

Now to find duplicates, you can do a Google Search "php find duplicates in array object". Maybe the array_unique method is what you can use. But not sure about that.

127 Posts
Cappu
10 years ago
0
Level 1
Hi Seblod Developers,

please, could you confirm: The Before Render won't work on List Type. - Is this right?

If so, are there plans to expand its use on List Types, too?

Thanks for a quick hint.

Kind regards,

Bernhard


Get a VIP membership