Skip to main content
Share Your Experience: Take the 2024 Developer Survey
15 votes
Accepted

Relative rendering DataSource Locations

DataSource Location inside rendering parameters has different context. You could achieve your goal by extending resolveRenderingDatasource pipeline. Allows developers to override the default logic ...
Alan Płócieniak's user avatar
12 votes
Accepted

Site-relative datasource locations

Would that work for you? ancestor-or-self::*[@@templateid='{website-root-template-id-here}']/*[@@templateid='{shared-content-template-id-here}']/*[@@templateid='{contacts-node-template-id-here}'] ...
adragomanov's user avatar
10 votes

Can we design the View renderings with multiple data sources?

You could create a new template to create datasource items that bundle your "multiple items" (in separate link type fields, or with a multi-select type field - as you want). This way you are able to ...
Gatogordo's user avatar
  • 20.1k
10 votes
Accepted

Edit a Sitecore item in memory only

Don't overwrite the Sitecore.Context item with the one you are fetching for the wildcard. Keep the wildcard item as the context item. Instead, put the product item in a sort of wildcard context. You ...
Bart Verdonck's user avatar
9 votes
Accepted

Automatically creating data sources for renderings on a new page

To answer your question: branch templates are the way to go, here. However, branch templates, alone will not give you all you need. I have actually written a rule to provide this "branch preset&...
Zachary Kniebel's user avatar
8 votes

DatasourceUsagesCount request slowing down Experience Editor

I agree with you, datasource count sometimes makes no sense. But from what I know there is no config which you could use to hide this functionality. You can remove this call by editing this file: ...
Marek Musielak's user avatar
  • 23.8k
8 votes
Accepted

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

Long story (and quite a few checks, verifying code, ...) short: it was a very stupid issue. But one that can occur if you don't think twice about your datasource query. Browsers have a maximum length ...
Gatogordo's user avatar
  • 20.1k
7 votes
Accepted

Set relative datasource for rendering

I'm going to try and make this not a link only answer. What you are trying will not work because the renderings fields (shared and final) want to store the ID of the data source item. If you just type ...
Richard Seal's user avatar
  • 20.5k
7 votes

Set sitecore treelist datasource from multiple paths

I can think of two options to solve your issue: Create some custom code to make a "query" possible together in the datasource. Luckily for you that is already been done and well documented. ...
Gatogordo's user avatar
  • 20.1k
6 votes
Accepted

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

You can access MongoDB directly through the C# driver: string connectionString = ConfigurationManager.ConnectionStrings["analytics"].ConnectionString; var client = new MongoDB.Driver.MongoClient(...
Dmytro Shevchenko's user avatar
6 votes
Accepted

DatasourceUsagesCount request slowing down Experience Editor

I just put a ticket in with Sitecore for this last week. Here is the fix from Sitecore. The fix allows you to pick how long the call will wait before it return a *+ result with no count. The ...
Chris Auer's user avatar
  • 13.1k
5 votes

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

When you specify the datasource in the Data Source field of the Rendering item definition, you effectively set the "default datasource" for that component. If you do not specify the Data Source in ...
jammykam's user avatar
  • 13.8k
5 votes
Accepted

Delete Data sources without any referrers

You can do that in a few steps: Rebuild your link database Search for datasource items for example by template id For each item check if it has referrers Delete item The code can looks like this: ...
Bartłomiej Mucha's user avatar
5 votes
Accepted

SXA and local vs reusable datasources in a custom control

If you will open for example Sitecore.XA.Feature.PageContent.config you will see there <autoDatasourceRenderings> section. You can use that section and put there your rendering ID - this will ...
Dawid Rutkowski's user avatar
5 votes

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

What you need to do is walk back up the tree to your Site root item and then path down to the Datasource folder you need. You can do it something like this: query:./ancestor-or-self::*[@@templatename='...
Richard Seal's user avatar
  • 20.5k
4 votes

How to create component data sources automatically?

Just to add to the discussion, in SXA they only use getRenderingDatasource to create the Page data folder and adding the global and page data items to the DatasourceRoots object. SXA creates the ...
Chris Auer's user avatar
  • 13.1k
4 votes
Accepted

How to create component data sources automatically?

What you actually need to do are two things: Create the datasource item Prevent the dialog from appearing Creating the datasource is done in the getRenderingDatasource pipeline. Add a processor ...
Gatogordo's user avatar
  • 20.1k
4 votes

Managing field data sources per environment

There are multiple ways that you can do this. But you are on the right track with putting the value in app settings and changing the values on deployment (not build). The implementation will depend ...
Richard Seal's user avatar
  • 20.5k
4 votes
Accepted

Map Model Metadata on page in View

So it sounds like you are trying to get access to a datasource (Article) item as well as the current context item (WebPage). To do that, you would need to use a controller rendering. And within that ...
Dylan Young's user avatar
  • 4,314
4 votes
Accepted

Enabling Item Language Fallback for SXA component datasources

I used the rules engine to fix this. I created a rule under Item Saved (/sitecore/system/Settings/Rules/Item Saved/Rules/Language Fallback) that sets the enable item fallback to true on every save. ...
Gatogordo's user avatar
  • 20.1k
3 votes

Relocating items referenced by Datasources

I agree with Chris Auer (see comments on the OP) that Sitecore should be updating these references for you, even if the reference is a path. That issue should be investigated, and this solution does ...
Zachary Kniebel's user avatar
3 votes

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

You can do it using next code: @Html.Sitecore().Rendering("{240A3624-8600-4A7B-8C07-5846A673F1F0}", new { DataSource = "{7CB5F3A9-...
Vlad Iobagiu's user avatar
  • 18.6k
3 votes

Can we design the View renderings with multiple data sources?

You are able to use parameter templates and specify as much datasource as you need: Create a new template that uses “/System/Layout/Rendering Parameters/Standard Rendering Parameters” as a base ...
Anton's user avatar
  • 3,831
3 votes

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

I need the query to return Page 1, Page 2, and Page 3 while excluding items in the content folder (Accordion, Carousel). My best guess for how to do this now is to find the template IDs of all ...
DougCouto's user avatar
  • 409
3 votes
Accepted

Custom rendering datasource syntax without breaking experience editor

To get Sitecore to resolve datasources using custom logic, you can add a pipeline processor to the resolveRenderingDatasource pipeline in Sitecore.config: <resolveRenderingDatasource> <...
zzzzBov's user avatar
  • 873
3 votes

Custom rendering datasource syntax without breaking experience editor

You can create a custom processor in resolveRenderingDatasource pipeline: <!-- Allows developers to override the default logic for resolving the data source for renderings. --> <...
jammykam's user avatar
  • 13.8k
3 votes
Accepted

Automatically set datasource when adding a rendering to a page

You need to overwrite (create a new) AddRendering command. As you can read here the dialog is opened in that command and the only way to really change the logic there is create you own. As shown in ...
Gatogordo's user avatar
  • 20.1k
3 votes

Automatically set datasource when adding a rendering to a page

The "No Code" approach You can control the dialogue that pops up after adding a rendering. Navigate to your rendering and find the "Open Properties after Add" field. Set it to &...
Mark Cassidy's user avatar
  • 25.3k
3 votes

Automatically creating data sources for renderings on a new page

I think that the most flexible way to achieve what you want is to use a branch along with the Sitecore Smart Commands module. This module updates links when copying, duplicating, or creating from a ...
Ben Golden's user avatar
  • 3,313
3 votes

Automatically creating data sources for renderings on a new page

This is a feature that's been kicking around the Sitecore community for a while now. To get the feature you're asking for, creating the /Components folder automatically as a subitem of the page you're ...
Chris Sulham's user avatar
  • 1,458

Only top scored, non community-wiki answers of a minimum length are eligible