2

is it possible to total count grid from many entries?

Lets say, i have 3 channel entries. Channel 1 entry 1 has 3 grid entries, channel 1 entry 2 has 5 grid entries, channel 1 entry 3 has 7 grid entries.

The result should be 15. Also show beside the grid entries the number 1, 2, 3, ... 15

Thanks

2 Answers 2

1

This can be done a couple of ways. 1 - manually! enable PHP in the template and doing it that way.

2 - addon, i have used one before that i cannot quite track down now... but something like TALLY should do the job, try playing over at devot-ee: http://devot-ee.com/add-ons/tally

I might have even created a simple plugin myself to do this in the past. I truely cannot remember. But there is certainly options out there on devot-ee.

1

In 2.7.3 there are variables within grid, see http://ellislab.com/expressionengine/user-guide/modules/channel/grid.html#variables

{fieldname:count} //the current row being displayed
{fieldname:field_row_count} //how many rows are in the grid
{fieldname:total_rows} //the rows being returned by the query
1
  • Ah, gotcha, apologies I didn't read the question properly. Dec 19, 2013 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.