Skip to main content

Questions tagged [contains]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Using "contains" to find a string within an entry

I am trying to use a conditional on an entry detail page to show a section only if a certain field contains a "t" in it. This is what I have but it doesn't appear to be working no matter ...
Megan's user avatar
  • 131
1 vote
1 answer
50 views

Hand tailored contact form -no pluggins

I'm coming from Wordpress and really enjoying craft. I wonder though if it is possible to create a contact form without any plugins? And if so, how easy/worthy of an effort is is? In WP I would create ...
mauricio's user avatar
  • 187
2 votes
1 answer
3k views

Conditional to detect mobile devices with getUserAgent?

I want to create a User Agent check. (Yes I know. It is evil.) So I created an Array. The whole idea is to see if the user agent contains a specific word. This way I hope to circumvent regex trickery....
KSPR's user avatar
  • 3,788
1 vote
1 answer
321 views

Return entries where custom field partially contains

My entries have a field containing a third-party product id and a price, separated by a hyphen, like so: p666a-12.99 In the template, a plugin is returning me some product ids, and I want to return ...
Clive Portman's user avatar