Questions tagged [sitecore-query]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
840 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
289 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
917 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
160 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
512 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
209 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
10k 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
148 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
3k 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
3k 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='", ...
7
votes
2answers
662 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 ...
4
votes
3answers
1k 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
133 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
3k 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 ...
6
votes
1answer
1k 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 ...
2
votes
1answer
800 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/...
2
votes
1answer
576 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
317 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(@...
9
votes
2answers
7k 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
2k 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
43 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
988 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 ...
2
votes
1answer
437 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 ...
2
votes
1answer
206 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 ...
3
votes
4answers
581 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
795 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-...
4
votes
1answer
1k 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 ...
2
votes
1answer
338 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
1k 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 ...
9
votes
0answers
4k views

Droplink source query breaks with templateid or templatename

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

Set relative datasource for rendering

I have a template configured for two devices. Each device has its own type of rendering, but they share the same data source item. Each instance of the page template will have the following structure ...
1
vote
1answer
2k views

How to use Sitecore Item Web Api and query for a Sitecore item with a particular value in the field?

I am trying to query for a Sitecore item where a particular field has a particular value but am not successfull in doing so. I am trying to do http://sc8/-/item/v1/?query=/sitecore/content/Home/*[@...
2
votes
1answer
3k views

Get Current Item children by fast query

Using Sitecore 8.2 and the content tree looks like: sitecore |_Content |_Home |_Products |_Product 1 |_Product 2 |_Services |_Service 1 |_Service 2 The items ...
6
votes
4answers
1k views

Sitecore Query fails - “::” expected at position 92

The below query fails and throws exception. /sitecore/content/Abcdef/Sites/WXYZ/MNO/Application Contexts/Connect On Demand/Sections/Self Service/* returns "::" expected at position 92. where as I am ...
3
votes
3answers
9k views

Using Sitecore fast:query to grab all items under a specified page excluding items in a specific folder

I'm using the following query as a Source for my Droplink field: query:fast:/sitecore/content/Home/AboutPages//*[@@templateid!='{41BF6376-A2D4-4CF1-80C5-223067C84811}'] My intention is for this ...
6
votes
1answer
853 views

Item Language Fallback doesn't work for Sitecore query

This is for Sitecore 7.5 update-2 version. We are using Item-level Language Fallback and everything works fine except this piece gives error every time except when in Page Editor mode. item.Axes....

1
2