Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sitecore-query]

For questions related to the syntax of and issues with Sitecore Query notation

0
votes
0answers
26 views

How to get children of item in variant sorted [duplicate]

I need to get children of item sorted in rendering variant,i used query "query:./*" in variant to get children but i can not find way to sort in this query,Any idea ??
0
votes
1answer
32 views

using sitecore queries to search for items whose names contain a specific string

I'm using this line of code to search for items whose names are exactly the string i provide in the query: string query = path + "//*[@@templatename = 'Template Folder' and @@name='" + year + "']"; ...
0
votes
1answer
52 views

How to sort items in a query inside a variant?

I need to sort items returning from a query inside a variant. For example query:.//*[@@templatename='Template']. I need to sort these items since it doesn't work through build query. Any ideas?
3
votes
1answer
54 views

Source Query using the current language version

I have a source query over a standard Multi-List field and I want the query to retrieve items based on the current selected language. Is there any attribute that could handle that in the source query?...
2
votes
1answer
22 views

Get the list of languages of an item in a droplist field query source

As a source for a DropList, I would like to use a query that returns the list of languages defined for a specific item. Is it possible?
1
vote
1answer
33 views

Fieldsource query for droptree field

Is it possible to use query for Droptree field in Sitecore 8.1? In a multisite solution, I would like to point Droptree field source to an item in that particular site. Is this possible?
0
votes
0answers
11 views

How to get all items from a base template id [duplicate]

I have list of items,how can i get this items from base templateId in sitecore mvc. thanks in advance.
2
votes
2answers
82 views

Results are not coming in the order using sortorder from lucene index

I have some items present in an item folder and want them to retrieve from Lucence index. There is a requirement that we have to order items in the Sitecore based on the order set on the Sitecore CMS, ...
1
vote
1answer
80 views

How to get first child of an item in content tree?

I am trying to get only one item under a specific page in the content tree using a query in variant. I tried query:.//* but it gets all children under that item. I only need the first one. Any ideas?
0
votes
1answer
78 views

SXA Add Query in the variant definition

I am using SXA 1.7 and need to add a Query item under my variant definition, I found that the query should be written using sitecore query format like "query:./*" to return the child items but it ...
2
votes
1answer
137 views

Controller action not called due to rendering datasource containing query:/

The existing project is upgraded from Sitecore 8.0 to Sitecore 9.0u1. After that, I've observed that few renderings are not working. The root cause is, controller rendering datasource query. If ...
0
votes
2answers
203 views

Multilist source query to exclude items whose parent has a specific template id

I'm on Sitecore 8.1 and I have an item that has a multilist that allows a user to select all items under a site, but I want to exclude a couple items and their descendants. The basic tree structure ...
3
votes
2answers
278 views

Why we should not use fast queries in Sitecore

As per blogs and best practices of Sitecore, its advised that fast queries should be avoided. The reason for that is fast queries will directly access the DB and fetch the results which causes ...
4
votes
2answers
646 views

Get all Children in the order defined in Sitecore

I have following structure in sitecore > Country > India > Srilanka > Bangladesh The following query returns all the child items but in alphabetical order string ...
1
vote
1answer
139 views

Sitecore hosting on AWS with Blue/Green deployment for zero downtime

We are currently having Sitecore 8.2 update 6 runs on AWS. We are planning to implement Blue/Green deployment for zero downtime and disaster recovery. The plan is to have 2 set environments as Blue ...
0
votes
1answer
99 views

Error During Upgrading Sitecore 8.1 to Sitecore 9.0.1

Hi all i'm getting the following Exception while upgrading the instance: 6848 07:38:16 FATAL [Experience Analytics]: Failed to synchronize segments. Message: Object reference not set to an instance ...
1
vote
0answers
117 views

Search filter for Year on a date field in template

I am using Sitecore 9.0.1 with SXA components. I have checked the SXA out of the box components for search functionality. For date fields, we have date range by which we can filter items in a specific ...
0
votes
1answer
55 views

Add renderings for all specific folder items using PS

We have a following structure : master:/content/market1/myfolder master:/content/market2/myfolder master:/content/market3/myfolder etc. I would like to add renderings for all items within "...
0
votes
1answer
59 views

Finding siblings in buckets

We've a folder item which stores all new artciles. This item is bucketable. But after turning into a bucket, we are not able to find previous and next sibling of an item under bucket. The below code ...
0
votes
0answers
150 views

How to automatically escape item paths for use in Sitecore query

Is there some API utility method which can automatically escape an item path for use in a Sitecore query? I am building a query string in code which uses an item path. If the item path contains a ...
0
votes
1answer
140 views

Multi list with search not working for Italian language

I have issue in Multi list with Search in Sitecore. I'm using Sitecore 8.1 along with Solr 6.5. I'm using the below query to load the items in the multi list. Items are loading perfectly on English ...
0
votes
1answer
220 views

Multilingual - Sitecore General Link Field Url Giving Embedded Language in Wrong Format

I have a requirement where my URL should be in format : http://domain/de-DE/pagename I have following settings done for my site: <setting name="Languages.AlwaysStripLanguage"> <patch:...
1
vote
1answer
68 views

Issue with publishing in Sitecore, datasource is not set for few items

I have a Sitecore 8 project where we have created a component for the editors to use. On that editor we used product detail where image carousel is being used to display images. An image carousel ...
5
votes
1answer
177 views

Sitecore Query - Restrict to context Language (in RSS feeds)?

I am using Sitecore's RSS feed, which has a field for Items. You can set this field to a Sitecore query to find items within your website to show within your RSS feed. I have it configured like so: ...
0
votes
1answer
52 views

Anchor tag not scrolling in EXM Generated in Outlook and GMail

I am sending email from Sitecore EXM 3.3. The email has a list of the Article as links on top and detailed articles list are at the bottom of the email. When user will click on an article link, the ...
2
votes
1answer
2k views

How to query for items under @@id with specific @@templateid

I'm trying to query a folder under the media library which has a bunch of templates based on a custom File template. I've tried to play around with a couple approaches but none of them have been ...
2
votes
0answers
80 views

Item Query not returning results when search with custom field in Arabic language

I am using Item Query to get featured Items using Isfeatured field in template, so my query like this: +template:{A0ABC519-3848-4930-965A-90F9F1B7F319};custom:isfeatured|true;language:english It is ...
1
vote
2answers
527 views

Setting up Datasource in templates

I have a Droplink field and I am trying to set the data source in the templates. What I want to do is set the data source by id instead of path and also add a filter by templates For example query:/...
3
votes
1answer
841 views

Get item by Display name in sitecore

How can I fetch the item by display name? The below code is not working: string url = string.Concat("fast:/sitecore/content/KeenanDirect/#" + string.Format(blogtype) + "#//*[@@Display name='", ...
6
votes
2answers
246 views

Is there a way to reference another database in Multilist with Search

I created a user content generated database in Sitecore where I will store my users and their comments. I plan to have a subscriptions item bucket that will be stored in the web database (published ...
3
votes
3answers
456 views

Site navigation - how to best to set the active class of all parent items of the current context page item?

I have a multilevel navigation control and I would like to add an active class and aria-expanded="true" to the <a> tag when one of the item's descendants' ID matches the Html.Sitecore()....
3
votes
1answer
85 views

Sitecore 7.2 Analytics DB records grown in size to 200 GB+

Sitecore 7.2 Analytics DB records has grown in size to 200 GB+. Does anyone know of any recommendation for purging old data and this is a production setup so the impact of this data being removed ...
4
votes
2answers
1k views

Retrieving multiple items in treelist query

How can I get a query-based treelist to return a list of items relative to the current item, that fits a template, instead of only the first result Search structure: -Parent Item --Segments ---Item ...
0
votes
0answers
97 views

How to debug warmup query and is there any help document/ or guidelines available?

We have recently observed performance issue while loading multi-list with search fields. Example - Let's say we have 5 multi-list with search field with the different data source, All these queries ...
6
votes
1answer
394 views

Why Multilist with search is not showing data in case of data source content setup in multilingual?

We have found one issue when we add a data source to the field MULTILIST with search it works fine but in case if we add a new language version for that data source then it’s giving only first three ...
3
votes
1answer
298 views

Showing selected folder from the content node in tree-list is not working

Showing selected folder from the content node in tree-list is not working. We have used the below query but looks like only parent node is visible not the child nodes. DataSource=/sitecore/content/...
1
vote
1answer
264 views

Where to find Visit Duration and Latest Date Visited in Code Behind

I am creating a process that reads in the Sitecore analytics contact collection and gets information needed for a report. It is read and inserted in SQL Server. Not sure how to get some of the fields ...
1
vote
0answers
175 views

Issue while using contains() for multilist with sitecore Query string?

While using query string as data-source getting some issue and facing challanges, here is the Query-string: ancestor::*[@@templatename='A']/Shared/*[@@templatename='AB']/*[contains(@...
7
votes
2answers
3k views

Get all items where a certain template appears in its template inheritance

Is there a way to get all items where a certain template appears in its template inheritance? Say I want to get all items where /sitecore/Templates/Common/Sections/Search appears in that inheritance ...
4
votes
2answers
1k views

Is it possible to use a Sitecore query to set an item's data source?

I have a branch template that is used to create a landing page with related content. I want to set the data source of the parent page's content sublayout to the parent page's content item child. test-...
1
vote
0answers
28 views

Sitecore WFFM- get all dropouts data programmatically [duplicate]

We have the requirement like, pull the all dropout users information and send email to our client. I know that WFFM captures form dropout data, but how to get this data pro-grammatically,I check with ...
2
votes
2answers
588 views

MVC Areas using with Sitecore 8.2 Update1

We have a requirement to work with MVC Areas in Sitecore 8.2 Update1 CMS application. We tried to use the Area field in Item definition, but view engine is still searching in the default controller ...
1
vote
1answer
259 views

Query item in Xpath [closed]

i have 2 sites, A and B in Sitecore. Some items in site A are linked to items in site B. I need a query to list all items in site A that are linked to any items in site B. I can't touch in code. Any ...
3
votes
1answer
145 views

how to delete item in dropdown list wffm

can we delete list item in WFFM? I want to delete "3HUTCHISON" from dropdown field, but when i clicked (x)(delete) nothing happened. i am new to sitecore, i need to make 48 items for dropdown list ...
4
votes
4answers
448 views

Creating a very large footer menu efficiently

I have a scenario where each page of a site has a checkbox for "is in header" and "is in footer". The universe of items that needs to be traversed is a couple of hundred in nature, and I'm looking for ...
0
votes
2answers
400 views

Sitecore Fast Query on Multi Lingual/Language Fallback solutions

How can we make the fast queries work in multi lingual and Language fall back scenarios? We are using Fast queries across our code to fetch items. and we are facing issue when trying with multi-...
3
votes
1answer
472 views

How to Join MongoDb Collections Using Sitecore Mongo Db Report Data Source

Am using sitecore 8.0, below code gets the analytics from the mongo db. I have two collections "ineractions" and "ContactId", I want to join both the collections using common field "contact" from ...
3
votes
1answer
214 views

fast querying items restored from the bin

I deleted an item located at /sitecore/content/foo/bar with several subitems from Sitecore and restored it back from Recycle Bin immediately. Now I'm able to see all the subitems if I run a query in ...
2
votes
2answers
598 views

Sitecore Fast Query not returning never published item

I have a people node which consists of 3500 people. Out of 3500 people 2600 items are marked as NeverPublished=True. So in Web database I have only 900 items. i want a fast query on master database ...
5
votes
0answers
2k views

Droplink source query breaks with templateid or templatename

I have a few fields in a template, and two of them have templatename restrictions. Using the restriction, I get 0 results, and when removed I get all the items I want (plus others I don't) With ...