Questions tagged [array]

The tag has no usage guidance.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
410 views

Checking if a value matches an entry type handle

I am trying to check if a value provided by the user (url segment) matches an entry type, and if not redirect to 404. {% set section = craft.sections.getSectionByHandle('shop') %} {% set entryTypes = ...
1
vote
0answers
38 views

Product variant association

On my Products details page I have 2 selects. The 1st select list out the Primary variants. Based on the selected Primary variant the 2nd select is auto-completed in with Secondary variants that have ...
1
vote
0answers
97 views

Create a baseball standings table

I am building a baseball standings table. I currently have a Single section setup in Craft to handle some basic info. It contains a table field with 3 rows: Team, Wins and Losses. I am able to output ...
1
vote
0answers
428 views

Advanced filtered search: Matrix fields and arrays

Having scoured the forums for similar questions of which there are a few, I'm still struggling to figure out my specific usecase. I have 4 filters and a search box (which searches a custom tag field) ...
0
votes
0answers
13 views

ArrayHelper::stringToArray creates sometimes index array

It looks like the craftcms 2 ArrayHelper created indexed array on large strings. But I'll need a none indexed array. Any ideas what I'll do wrong? Running on php 7.1. $playerIds = ArrayHelper::...