Questions tagged [batch]
The batch tag has no usage guidance.
7
questions
2
votes
1
answer
50
views
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 ...
1
vote
1
answer
741
views
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 ...
1
vote
1
answer
252
views
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">
{% ...
1
vote
2
answers
364
views
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 ...
1
vote
1
answer
848
views
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 ...
0
votes
1
answer
174
views
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 ...
1
vote
1
answer
382
views
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 category.id == '647' %}
{% set nr = '5' %}
{% else %}
{% set nr = '4' %}
{...