jpea
  • Member for 7 years, 7 months
  • Last seen this week
Looping through a Global with a Matrix field
Accepted answer
6 votes

{% for block in contactDetails.myMatrixField %} {{ block.location }} {{ block.address }} {% endfor %}

View answer
Can I get an entry by Matrix Block ID?
4 votes

Perhaps just grab the URL segment and set it as a variable: {% set mID = craft.request.getSegment(2) %} {% for entry in craft.entries.section('whatever') %} {% for block in entry.myMatrixField.id(...

View answer
Multiple entry templates per entry
Accepted answer
4 votes

If they can live at different URL's, you could setup multiple routes under Settings->Routes. Give them different URL structures like so: blog/slug loads mytemplatefolder/blog_template another-url/...

View answer
Memory issue when updating all entries from a channel (allowed memory size of X bytes exhausted (tried to allocate Y bytes))
3 votes

It's likely because PHP's per-process memory limit is set too low for this particular script. I would not raise it globally using your php.ini file, but raise it right in your script on a per-process ...

View answer
Craft CLI ./craft - can I tell it to use a specific php version when running composer via the CLI?
1 votes

This is something I completely overlooked, but the Craft CLI is just a PHP wrapper that's executable on the CLI. So this will work: /usr/bin/php73 craft help or /usr/bin/php73 craft update all Will ...

View answer
Looking to use a tag slug/URI and loop through entries of that tag
1 votes

Not sure if this is the best way to go, but thus far I've used a custom route (in Settings->Routes) to setup tag listing/landing pages. Something like tags/* so the wildcard catches the tag slug. {% ...

View answer