Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [batch]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

Lowering memory usage on task batches

I build a plugin for Craft 2 which imports data from an excel file into craft commerce products. The problem is that it needs to import excels with like 10.0000 rows and 30 columns. I made a simple ...
Pieter-Jan De Bruyne's user avatar
1 vote
1 answer

Use Twig's batch filter with conditional

I am trying to make a grid of blocks using Twig. I have different types of blocks so I am using a conditional to test the block type and render different components per block type. The problem I am ...
mrseanbaines's user avatar
1 vote
1 answer

Attempting to create a complicated grid layout with batch

I'm trying to create the following layout using batch, but I can't quite get it right... This is how far I've gotten: {% for entry in items|batch(3) %} <div class="row rowDivider"> {% ...
erich's user avatar
  • 31
1 vote
2 answers

Wrapping a matrix block

I'm outputting fields from a Matrix block, how do I then wrap all outputted fields from 'artworkFile' that are available with some HTML. Not individually wrapped, but all outputted fields. Current ...
sarah3585's user avatar
  • 899
1 vote
1 answer

Create a new row every 3 items in a matrix

I need to output a row every three items in a matrix. Here is what I have so far. The problem is that this outputs a row every three items but it duplicates each matrix item three times and puts them ...
Steve's user avatar
  • 93
0 votes
1 answer

Craft plugin controller for batch update users break with empty page

I made a plugin to update my 3000 users. It is kind of a toolbox to manage and update some users fields. I am calling the controller directly through its url action. It is working basically but it ...
Miguel Bocquier's user avatar
1 vote
1 answer

Add batch filter as variable

I want to add a batch filter with a variable number depending on a conditional. Is this even possible this way: {% if == '647' %} {% set nr = '5' %} {% else %} {% set nr = '4' %} {...
KSPR's user avatar
  • 3,786