Questions tagged [case]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
67 views

Craft's case-insensitive routing

I was just surprised when I noticed, that our Craft installation is not case sensitive with routing: E.g. https://domain.com/route/to/page-with-content delivers the same content as https://domain.com/...
user avatar
2 votes
2 answers
303 views

Loop index inside a switch content builder

How would one construct this? I have built a little content builder and wish now to change the layout HTML on the fly when there are more than one matrix block. In the example below, this is just one ...
user avatar
  • 333
1 vote
1 answer
197 views

lowercase breadcrumbs

How do I parse the breadcrumbs code: {% if entry.level > 1 %} <ul class="crumbs"> {% for crumb in entry.getAncestors() %} <li>{{ crumb.getLink() }}</li> ...
user avatar
  • 598
2 votes
1 answer
81 views

Tag case sensitivity

At the moment use of Tags seems to be case insensitive. So, for example, it is possible to tag an article as both 'IT Support' and 'it support'. Is it at all possible to make the Tags case sensitive?
user avatar
  • 1,711
7 votes
1 answer
2k views

"A" or "B" in switch statements?

Is it possible to provide different possible values per case? I've tried the following formats without success. {% case "A" or "B" or "C" %} {# run this if case matches A or B or C #} I saw this ...
user avatar
  • 1,369
1 vote
3 answers
243 views

Opening and closing table within a switch

Within my matrix I have two blocks: Day and Event. Day is just a date field while the event block has two text fields. What's the best way to wrap the event data, which needs to show up as a table ...
user avatar
  • 1,685