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 [datasource]

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

3
votes
1answer
21 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 ...
1
vote
1answer
20 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 ...
0
votes
1answer
48 views

How to get SXA datasource items from personalization

I'm trying to get all datasources of a rendering, including personalization. As we are using SXA the datasource strings look like this: local:/Data/Test What is the best way to get the item from ...
1
vote
1answer
89 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 ...
4
votes
1answer
72 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 ...
1
vote
1answer
86 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 ...
0
votes
1answer
84 views

How to display items which has version in Sitecore multilist

I am trying to filter data source field with current language and also with version if it exists. Below is what I have added dataSource={13E3E375-7314-4CC7-97B7-DC78F71FC47E}&Filter=-...
2
votes
2answers
134 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] ...
2
votes
1answer
242 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 ...
2
votes
1answer
108 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 ...
0
votes
2answers
503 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 ...
6
votes
2answers
362 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 ...
1
vote
0answers
29 views

How Does __Preview Get Populated

In a Sitecore 8.2 (rev. 170614) instance an item was throwing the following error when selected in content editor: Server Error in '/' Application. Data at the root level is invalid. Line 1, ...
0
votes
1answer
575 views

Selection of Global or Local Data source in presentation details

Selection of Data Sources in Presentation Details : There are two data sources for the footer component , one at the local repository level and another in the Global Content level. While choosing ...
1
vote
1answer
157 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 ...
1
vote
2answers
857 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:/...
7
votes
1answer
204 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 ...
3
votes
0answers
161 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 ...
3
votes
1answer
123 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 ...
3
votes
2answers
78 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 ...
3
votes
1answer
347 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 ...
5
votes
1answer
599 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 ...
1
vote
1answer
341 views

Accessing the 'Datasource Template' field in code

First time here. Is it possible to access the 'Datasource Template' field on a rendering? If so, how can this be achieved? I need to run a check to ensure that data sources are not removed but also ...
2
votes
0answers
459 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 ...
0
votes
2answers
2k 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 ...
5
votes
2answers
789 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 ...
5
votes
2answers
647 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-...
6
votes
2answers
1k 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 ...
9
votes
6answers
3k 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: ...
5
votes
2answers
713 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 ...
3
votes
3answers
7k 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 ...
10
votes
3answers
2k views

automatically creating datasources 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 ...
6
votes
2answers
3k 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 ...
3
votes
1answer
374 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 ...
10
votes
2answers
1k 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 ...
6
votes
1answer
494 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 - ...