Skip to main content

Questions tagged [datasource]

For questions related to Sitecore data sources, including data source queries, data source locations, data source items, etc.

Filter by
Sorted by
Tagged with
10 votes
2 answers
2k views

Relative rendering DataSource Locations

How do I define DataSource Location for rendering parameters, relative to the context item? When defining a DataSource Location for rendering parameters (Droplink or TreeList etc), using a relative ...
Kasper's user avatar
  • 2,156
10 votes
3 answers
4k views

Automatically creating data sources for renderings on a new page

In a project, I have been working on before we had a solution in which when a content editor created a page of a certain type a Components folder was created and the renderings of that page would ...
Gluip's user avatar
  • 366
10 votes
6 answers
5k views

Dynamic data source of the view rendering is not working in sitecore 8.2

I use sitecore 8.2 and I can't understand the purpose of the "Data source" field on the "View rendering" item. It seems that datasource works only when I statically specify it inside the cshtml file: ...
Sergey Smelov's user avatar
8 votes
4 answers
8k views

Set sitecore treelist datasource from multiple paths

Trying to set datasource for a treelist field in Sitecore. Need to set two different folders as path. DataSource=/sitecore/content/home/folder1|/sitecore/content/home/folder2 It does not work, it ...
TomCat's user avatar
  • 333
7 votes
2 answers
3k views

Automatically set datasource when adding a rendering to a page

My goal is to automatically set the datasource of a rendering when an certain rendering is added to the page in the Experience Editor. Since the datasource item is created when the user adds a ...
Nico Grms's user avatar
  • 575
7 votes
1 answer
433 views

Delete Data sources without any referrers

I would like to clean sitecore and delete all local data sources that are not in use. I know that I can go through each DataSource item and check in LinkDatabase if it has referrer or not. But I have ...
Ihor's user avatar
  • 173
6 votes
3 answers
1k views

DatasourceUsagesCount request slowing down Experience Editor

I am using Sitecore 8.2. The Experience Editor has a feature called as "Usage" which appears in the widget that shows when we select a component/rendering. The purpose of the usage functionality is to ...
Jay's user avatar
  • 63
6 votes
1 answer
1k views

Site-relative datasource locations

We have a multisite setup, where Shared Content is stored in a node for each site as a sibling to the site frontpage. For example: - Website 1 -- Home --- Some page -- Shared Content --- Contacts - ...
Kasper's user avatar
  • 2,156
5 votes
2 answers
1k views

Can we design the View renderings with multiple data sources?

I am doing project in Sitecore MVC. For every view rendering we are giving one data source for model reference but I need to get the field values from multiple items. So can we design the view ...
Indrasena's user avatar
  • 337
5 votes
2 answers
2k views

How to create component data sources automatically?

When a component is added to the page in the Experience Editor, its data source field is empty. The content editor then needs to manually create or select a data source in the "Select the Associated ...
Dmytro Shevchenko's user avatar
5 votes
4 answers
2k views

Datasource Location not working as expected

I created a rendering for my form and linked the datasource location to sitecore/forms (which should be correct). The mysterious thing about this is that when I select my rendering in the experience ...
Robin Lundgren's user avatar
4 votes
1 answer
331 views

Edit a Sitecore item in memory only

I'm using a custom item resolver to take a call to a wildcard item and use the URL to grab an item in a catalog of products (not Commerce). I've got the parser set up, but I've hit a conundrum. The ...
Ken McAndrew's user avatar
  • 5,112
4 votes
1 answer
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 ...
Suresh R's user avatar
  • 349
4 votes
2 answers
2k views

Custom rendering datasource syntax without breaking experience editor

I'd like to be able to use a custom datasource syntax for renderings and sublayouts. In particular I'd like to be able to handle custom prefixes for various different usages. The main one being site-...
zzzzBov's user avatar
  • 873
4 votes
3 answers
11k 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 ...
c-bro's user avatar
  • 567
4 votes
1 answer
1k views

SXA and local vs reusable datasources in a custom control

In SXA we have components like the Rich Text component that have a version with a local datasource and a reusable version that gets a datasource from a global (site) folder. This all works fine and I ...
Gatogordo's user avatar
  • 20.2k
3 votes
2 answers
1k views

Copy/Duplicate items - datasource of local components points to original item instead of newly created local item

This is an old issue, and it was resolved in our old 8.2 instance by a prior dev but after upgrading to 9.0 the issue has reappeared. When a user copies or duplicates an item, all of the local ...
Erica Stockwell-Alpert's user avatar
3 votes
1 answer
460 views

Enabling Item Language Fallback for SXA component datasources

In our Sitecore instance we have a number of different languages, and we have enabled item level language fallback. We have enabled item level fallback on all of our page templates, and this works as ...
LukasEngedalNC's user avatar
3 votes
1 answer
337 views

Add “New Folder” button to datasource picker [closed]

I'd like to enable content editors to better structure their local datasources in the Sitecore Editor when using the experience editor to select datasources for renderings. I'd like them to be able ...
Chris's user avatar
  • 139
2 votes
1 answer
2k views

Getting a "Resource you are looking for has been removed" error in the datasource selection dialog

In a custom SXA control (just a copy of Promo) we started getting the error: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." This happens on ...
Gatogordo's user avatar
  • 20.2k
2 votes
2 answers
96 views

Managing field data sources per environment

We are using external APIs as data source values for some template fields within Sitecore. We would like to change that data source depending on the environment. For example, on staging the data ...
MikeD's user avatar
  • 870
2 votes
2 answers
1k views

Relative datasource for template field

I have created a branch template [Comparison Chart] which contains a folder item called [Headers] which is designed to contain items of the template [CChart Header]. Inside the [Comparison Chart] ...
Michael's user avatar
  • 520
2 votes
1 answer
705 views

Map Model Metadata on page in View

I have a Article View Rendering that contain Datasource Location that points to its Article Datasource item. The view rendering cshtml file is Article.cshtml. I'm using Glass Mapper to map Article ...
Đặng Tú's user avatar
2 votes
1 answer
105 views

Vanishing Data Source, Placeholder, etc Fields When Rendering Parameters Template Set

In Sitecore 10.1, when I set the Parameters Template in my rendering, the Edit component properties dialog shows the expected parameters fields but all other fields, including Data Source, Placeholder,...
Aron Boyette's user avatar
2 votes
1 answer
176 views

A/B testing of components using Glass Mapper return "Data source invalid."

I am using Sitecore 9.3 with Glass Mapper 5.8.177 and component A/B testing does not work for me. I set up a simple component that works perfectly fine until I begin creating variants for A/B testing ...
9_9's user avatar
  • 121
2 votes
1 answer
364 views

Relocating items referenced by Datasources

In our articles we have a publisher control where we select the publisher in the data source: The problem is when I try moving the publisher to another location in Sitecore some of the links break ...
jahan's user avatar
  • 83
2 votes
1 answer
263 views

Incorrect datasource location being displaying in Experience Editor while adding new component

I am having an issue regarding datasource location while adding a component in experience editor. The component datasource location is set to a particular datasource folder item(/sitecore/content/Site ...
user9152709's user avatar
2 votes
3 answers
1k views

How to check request id is a page id or datasource id in code in Sitecore?

I want to check requested item id is a page item id or datasource item id through code. For more clarity, I have a scenario in SXA where we need to check requested id is page id or datasource id. If ...
Ashish's user avatar
  • 912
2 votes
1 answer
501 views

Field source tokens for media items like image field

I have been using tokens for a while, patching in a processor to the getLookupSourceItems pipelines and transforming a token like $siteName$ into the site name. Or $site$ into the the current sites ...
Chris Auer's user avatar
  • 13.1k
2 votes
1 answer
973 views

Sitecore Image Field Source to filter on template type

Is it possible to set the source of an image field so it filters on a specified template name. so only showing these images to be associated with the item Tried various ways from the following link ...
Mathew's user avatar
  • 21
2 votes
1 answer
613 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 ...
venkat's user avatar
  • 398
2 votes
1 answer
426 views

Template source location media folder

When I create a template entry for an image with source location like /sitecore/media library/Icons/Bezahlarten I've added some images to this folder, but when I whant to select an image for this I ...
squadwuschel's user avatar
  • 1,165
2 votes
2 answers
1k views

How to specify a datasource for a droplist field in sitecore 8.0 template

I am using Sitecore 8.0 where I have created a template with field droplist field type and I want to give datasource for it where it references another template datasource. And we have Multiple Sites ...
Vinaya's user avatar
  • 321
2 votes
1 answer
74 views

GetRenderingDatasourceArgs.DatasourceRoots never use the other items added into it

I'm extending Sitecore.Shell.Applications.WebEdit.Commands.AddRendering, and from the code there's GetRenderingDatasourceArgs.DatasourceRoots and I am adding items on it: var customdatasourceroot = "/...
Tofu TheGreat's user avatar
2 votes
1 answer
38 views

Additional links next to Field name?

I am new to develop using Sitecore and have a question I saw in some tutorial website there are addition links next to the field name, like [Go to field] [Reset Field] [Go to datasource] Is this ...
Anthony's user avatar
  • 23
2 votes
0 answers
338 views

Get Lookup Source Pipeline not triggering for treelist

I have a dynamic source for a treelist field in my template. In order to resolve the source location, I created a pipeline in getLookupSourceItems section. The code snippet is shown below. public ...
adarsh's user avatar
  • 818
2 votes
0 answers
804 views

Set query as datasource in personalization

I'm on Sitecore 8.2, using MVC. I have two sites, and I'm defining presentation details on Standard Values of the template, so that I can use one presentation details setup for rendering the same ...
Dalibor Kovač's user avatar
1 vote
1 answer
75 views

sitecore query from field value

I'm trying to make Sitecore Forms easier for my content editors to use. They use the Content Editor and never touch layouts, controls, or renderings. I've made an item template with a single droptree ...
Brian Heward's user avatar
1 vote
1 answer
108 views

Extending treelist having issues with token resolver

I am following this article to extend treelist field - https://jammykam.wordpress.com/2016/01/06/specifying-query-and-parameters-for-sitecore-treelist-field-source/. We want to have a treelist field ...
Vinod Chavan's user avatar
1 vote
1 answer
95 views

Are individual yml files needed for each component param option?

As an example, I'll use a generic content Block component. This component, among other params, would have a columnSpan param. As far as I can tell, the only way to predefine options for that param is ...
Jbird's user avatar
  • 160
1 vote
2 answers
5k 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:/...
Night Monger's user avatar
1 vote
3 answers
734 views

Setting a Relative Data Source in a Control

I have an Example page with a control on it. I want to reference a grandchild SubItem in that control. When I specify the full path as the Data Source everything works fine. However, I want to ...
Justin's user avatar
  • 311
1 vote
2 answers
1k views

Need help with a Query to select a data source context, for each site

I have a page template where when the site was setup it referenced the folder(Item ID), but now I have multiple sites and need it to reference ONLY the sites folders not just the main site. I am ...
user1566783's user avatar
1 vote
1 answer
609 views

"Select the Associated Content" window not showing local data source folder as option

I have pages that live within a bucket. The pages are based on a branch template, such that each newly added page will also have a child item which serves as a local data source folder (which is used ...
Marcel Gruber's user avatar
1 vote
1 answer
170 views

Datasource location overwritten at JSS deploy

The datasource location field of the renderings after deploying the items with JSS is by default : ./Page Components|/sitecore/content/tudorlocal/Components/ContentTest However, when adding a ...
pcolas's user avatar
  • 25
1 vote
1 answer
332 views

Sitecore JSS component datasource xPath query

I am having following content tree Sitecore Content myapp home -Products -Product-1 Related-Products-1 (based on Related-Products custom template) – having multi-list field in which we can ...
Amit Kumar's user avatar
1 vote
1 answer
745 views

Sitecore keywords in the metadata

Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose. Is it possible to get all the attached ...
user avatar
1 vote
2 answers
1k views

Failed to execute datasource query System.NullReferenceException while setting Datasource on Rendering

Has anyone seen this error before or know how to solve it? 996 16:35:46 WARN Failed to execute datasource query System.NullReferenceException: Object reference not set to an instance of an ...
Michael Edwards's user avatar
1 vote
1 answer
374 views

Sitecore Data source based on Country

We have requirement where based on Country User comes from Datasource should change corresponding to that country for example if User is accessing Site from China then Datasource should point towards ...
user2332873's user avatar
1 vote
1 answer
33 views

Elapsed Datasources Remain and Return Null in Web DB

In my current project, content authors can select an expiration date for when a datasource item will become unpublishable. We are encountering an issue where once this date has elapsed, the datasource ...
Henry Faulkner's user avatar