Introduction

Craft 3.5 arrives

Hello Craft friends. I hope this finds you doing well.

The top story is the release of Craft 3.5. You'll also find links to a free CraftQuest video course on what's new in 3.5. You'll also find some Twig, PHP, and Yii tips. I don't have individual links to share with you to Ben Parizek's Craft newsletter, but I agree with Ben Croker that if you're not reading it, you're missing some great Craft content.

Do you have a link for an upcoming issue? Visit the link submission page.

Thank you to the sponsors of this issue.

Fortrabbit is a preferred hosting provider for Craft CMS, offering a modern PHP application platform tailored for Craft, with Git deployments and Composer support. Try fortrabbit today.

Freeform is the feature-filled form plugin for Craft CMS that includes ready-to-use templates to get you up and running quickly. Learn about the power of Freeform.

Let’s hit the links.

-John Morton

Craft Link List  

Top Stories

News

Featured Sponsor

Tools, tips, and fundamentals




Perfecting your technique



Sponsor

Plugged In

Yii, Twig, PHP & More

Odd and even in a Twig loop.

Recently in the Craft Discord, someone asked the best way to alternate rows generated in a Twig loop. Twig is versatile when it comes to solving puzzles like this.

The loop index and the is operator is one solution as seen here.

{% for i in 1..10  %}
  <div>
    {{ i }} is {{ loop.index is even ? 'even' : 'odd' }}
  </div>
{% endfor %}

Maybe you don't need Twig at all, depending on the problem you're solving, the CSS rule :nth-child(even) could be enough, as demonstrated here.

Craft Link List  


It’s not Craft, but it’s interesting.