Questions tagged [conditional]

Conditional will perform different actions depending on some condition.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
40 views

chain of random entries based on relations

I'm developing a bio section for a client. Every bio is linked to another bio creating a chain of bios. The order of this chain should be random. The schema would be as following: Bios: Bio a, Bio b, ...
1
vote
0answers
43 views

Trying to display post based on two variables

I am setting three variables like so ... {% set featureEntryIds = craft.entries({ section: 'blog', featurePost: 1, limit: 1 }).ids() %} {% set articleClass = entry.id in featureEntryIds ? 'featured' ...
1
vote
0answers
95 views

Simpler way to code up a category conditional?

I've coded up conditional for categories. I'm still new to Twig and curious if there is a simpler way of coding the following. {% for feedItems in craft.entries.section('news').limit(null).offset(1)....
0
votes
0answers
19 views

Order Condition Formula in a Shipping Condition

I have digital products that are sold alongside physical products and need a way to set it so that the 'standard shipping' method is not shown as an option if ONLY digital products are in the cart/...
0
votes
0answers
123 views

Conditional to check position of previous matrix block

I'm referencing the Pixel & Tonic sample craft template Happy Lager where in the article body template there's a macro to get the position of a block. I'm trying to setup a conditional to check ...