Questions tagged [querystring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
81 views

How to create an advanced route with query strings?

I have a main structure as my navigation. Within this structure I have multiple image galleries. I want to make the image gallery's urls dynamic. If I define a gallery within the structure entry: ...
0
votes
1answer
140 views

Template query: Advanced section query to get unique items from custom entry type field

I'm trying to build a filter for a blog section in Craft 3. I'm fairly new to Craft and my client now wants a dropdown filter where they can filter out authors. Thus, I want to write a query that ...
2
votes
1answer
100 views

How to display entries filtered from more than one category

I want to try to learn how I can filter entries by multiple categories. I realise similar questions have been asked in the past, but all the answers are for specific use cases. All I want to do is ...
4
votes
1answer
414 views

Filtering multiple categories with URL queries

I am trying to filter using categories. I have to filters type and size, in the url. /products.html?size=medium,large&type=polo-shirt,jeans In my template, I am doing the following {% set sizes ...
1
vote
0answers
72 views

Filters using multiple query strings with pagination and Craft Commerce

I want to build the ability for the user to be able to filter by certain categories when browsing an existing category. As well as this I would like the user to be able to control the ordering of ...
0
votes
2answers
496 views

Filtering search with checkboxes multiple param querystring

I have a series of checkbox like so: <fieldset data-role="controlgroup"> {% for option in craft.fields.getFieldByHandle('area').getFieldType.options %} <input type=...
1
vote
1answer
124 views

Append a string to the end of all rich text links

I'm trying to append a string to the end of all rich text links. Is there an already existing plugin for this?
2
votes
2answers
211 views

getQuery() returns only one value

I have a URL passing values from form checkboxes to a template. All the checkboxes are grouped with the same name= attribute. When multiple checkboxes are selected, the query string looks something ...
0
votes
1answer
581 views

Is it possible to search in Craft Commerce by product type?

I am building an API that takes all products from the Craft Commerce Commerce_ProductModel. In this I am using the Element API plugin to build it out. I am running on Craft 2 latest version. I have ...
0
votes
1answer
80 views

Craft request returns null in test, but works locally

I have a search that is working locally, but not when I push it to my test environment. I imported the database from my local environment into test, so the data should exist. The URL for each is: ...
2
votes
1answer
2k views

Set cookie and redirect back to referral URL

I'm setting up a site for a brewery that requires age verification. When a user visits the site, I check for the presence of a cookie (I'm using nystudio107's cookie plugin) and if it hasn't been set,...
1
vote
1answer
39 views

Entries by non-contiguous postDate years

I'm trying to display and paginate entries by years, that aren't necessarily contiguous. {% set limitPerPage = 6 %} {% set eagerFields = [ 'title', 'press_release_name', '...
1
vote
0answers
87 views

Query over multiple split years

I have a list of year from a form field, not in consecutive order. (ES: 2008, 2010, 2012) I have built an url in this way: q=&year[]=2008&year[]=2010 to get all the records of years 2008 and ...
2
votes
2answers
215 views

How to set multiple 'active' classes from query string

I'm outputting all tags that are in use and then allowing the user to click these build up a query string to filter and display the results. It's all working fine. Except, I'm having difficulty ...
10
votes
1answer
5k views

Advanced query/filter based on date and values

I have a channel of events with a field ‘eventDate’ for the date/time of the event. Within that there are ‘types’ of events ‘eventType’. What would be the most efficient way of outputting the NEXT (...
2
votes
2answers
5k views

Get query string param that has no value

Is it possible to determine whether or not a query string has a param with no value. For example http://www.test.com?myparam Technically that's a valid url but the craft.request object doesn't ...
2
votes
1answer
281 views

Find Entries with Multiple Matches in a Single Field

I have entries in a channel called "shorts". Each of those entries has a field called "size" that can be a value of small, medium or large. I have created a form where I want users to be able to ...
2
votes
1answer
98 views

404 when clicking on the Disqus embed urls

I've just noticed on a site that the Disqus comment embed is suggesting other articles but they're adding a token to the end of the URL, for example: http://australia.thegospelcoalition.org/article/...