Skip to main content

Questions tagged [conditional]

Conditional will perform different actions depending on some condition.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
44 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, ...
Max Frischknecht's user avatar
1 vote
0 answers
44 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' ...
seth's user avatar
  • 117
1 vote
0 answers
98 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)....
Tad Ward's user avatar
  • 317
0 votes
0 answers
30 views

How to clear conditional field values when hidden?

In Craft CMS 5, I have several conditional fields that display or hide based on the value of a Category field (single selection). Depending on the selected category, different fields appear: Date, ...
Romain P.'s user avatar
  • 1,852
0 votes
0 answers
28 views

No option to add Credit Card Details field as a Conditional field

I'm trying to setup a payment integration having some slight issue with the conditional logic on Freeform. I'm on Craft CMS 3.8.12 (Pro Version and Freeform Pro). The form is supposed to have a ...
Armon's user avatar
  • 1
0 votes
0 answers
102 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/...
Christopher Healey's user avatar
0 votes
0 answers
131 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 ...
Niall Thompson's user avatar