12

Testing with SXA 1.2 on Sitecore 8.2 u1/u2.

I'm trying to query a list of pages marked as featured.

Here is what I have setup:

  • Custom Page template inherits from Page.
  • Checkbox field is added with IsFeatured field.

Custom Page Item

  • Query defined to return featured pages.
+location:{29E0ED6F-452B-45A0-B799-C51EBD14970A};template:{13de59b4-ad71-4542-9ce0-a0483422e768};custom:isfeatured|true

Query

  • The query item does not have a way to build the query, so I used the datasource

Query Builder Filter Configured

Unfortunately, when I test the page no results are returned.

Not working Not rendered

Update

Test with a new query that has a + for each setting but does not change the behavior.

Still not working

Update 2

Oddly, when I move the query to the Data Source field and clear the Source Type I get an error. Not seen this before.

Data Source set

error

2
  • Try to set Data Source field in the Page List rendering Control Properties dialogue (for example to root of your website or parent of the items you are looking for. Commented Mar 5, 2017 at 8:42
  • I think it also persists in 9.3 - having all sorts of fun with 9.3 queries in components, query item rendering variants and actual query items under settings (SXA) - tell me if I am wrong
    – Bruce
    Commented Mar 10, 2020 at 1:14

2 Answers 2

6

Unfortunately, somewhere along the way, Sitecore (at this time we're on 8.2 U2) lost its capability to have more than a single item provided as a data source.

Unfortunately, Query does not seem to be working in this version of Sitecore for when it returns more than 1 item AND SXA 1.2 breaks content search in data source mechanism altogether.

This will, however, have a workaround in SXA 1.3 where you will be able to use Lucene queries in the "query" item:

SXA Query

Once created, you will be able to use the query in Page List as follows.

In Rendering Parameters:

enter image description here

Select the query returning multiple items:

enter image description here

1

Try to build the query with + signs, like that:

enter image description here

2
  • I tried changing it to that but the issue persists. Commented Mar 3, 2017 at 16:37
  • @MichaelWest were you able to resolve this issue , looks like the same issue persists in SXA 1.8 as well Commented Apr 1, 2019 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.