Hot answers tagged

23

There isn't a way - really. Not an out-of-the-box one, anyway. To achieve it; Sitecore would need to record a delta of item changes - which it doesn't. Remove a rendering - Sitecore removes it; but leaves no paper trail of the event. What you're asking for is akin to what Item Clones does - except that it does not keep track of an entire item structure, ...


7

As a workaround, please perform the following steps: Create a backup before making any changes. Serialize the problem item (Developer > Serialize > Serialize Item). Open the created file (Data\serialization\dbname\itempath\itemname.item) with a text editor and set the master parameter: Master: {00000000-0000-0000-0000-000000000000} Save changes. Revert ...


5

Override InProcItemModelRepository class. Create patch file to override item model repository. Have look at Sitecore.DataExchange.Local.config There is configuration to specify item model repository. <dataExchange> <tenantRepository type="Sitecore.DataExchange.Repositories.Tenants.SitecoreTenantRepository, Sitecore.DataExchange"> ...


5

As mentioned in my comment, I noticed on a project that it was not possible to use queries in a datasource field. I had a branch template that created some children and the parent item might have renderings that have a datasource linked to one of the children. The first step was to get the items that I needed for the datasource: the original one (in the ...


5

There are actually a few options here: Command Templates Event handlers (item:added) Pipeline processors (uiAddFromTemplate, addFromTemplate) Command Templates This is by far the simplest solution, requiring the least implementation effort but is also the least extensible and flexible. What you would do is create a command template item under the branch ...


4

I know that this is an old post, but I was looking through and just wanted to add some information to help anyone who is actually still hoping to implement similar behavior to this. At a high-level, @MarkCassidy is correct that there is no OOTB mechanism for what you are describing. However, you could achieve a limited version of this functionality by ...


3

I don't know much about bucket location filters, but it looks to be a field on the bucket item. Where you want to start is with the addFromTemplate pipeline. This is the pipeline that is called when you create an item from a branch. Once you access this pipeline you can gain access to the branch items after it is created. I used code from Kamsar's Branch ...


3

There is a solution out there to help deal with this in a different way. Using the linked solution called Branch Presets, you would set your datasource as a normal, full path in your branch template. When a new item is added, if it is added from a branch template then datasources pointing under the branch template will update to the relative to the current ...


3

There isn't an OOTB way to achieve this. But. I always use Alen Pelin's SmartCommands. Included in this package is "Smart Create From Branch" which does what you need. Having this branch template my branch $name: linkField -> branchChild branchChild: linkField -> $name by default, the item created from this branch template ...


3

If what you are looking to do is create a new item with a specific ID from a specific branch template then what you are looking for is the following: var newItemName = "Name of Root Item to Create" // this may be overridden by your branch template depending on how you set it up var branchId = ... // ID of your branch template var parentItem = ... // parent ...


3

What you're asking for, doesn't entirely make sense. At least not to me. But let's start with the questions: The questions Can I create a new Item with a specific ID and branch? Well you can create a new Item with a specific ID, sure. It will blow up if the ID you're selecting already exists however. It looks like this: parent.Add("myNewItem", templateID,...


2

It turns out that the cause to my issue was lying within the rules set under Sitecore -> System -> Settings -> Rules -> Insert Option Rules, These rules make it easier to set insert options for a large set of items using simple logic, without having to set them in the standard values for those items templates. Following is a sample rule that will reflect ...


2

[CChart Row] template would have Multilist field instead of Droplist as you want to select multiple [CChart Hearder] items like blue, red green while Droplist will allow to select only one of these. Reg datasource query, you can use any of the below query:../Headers/* query:./ancestor::* [@@name=‘Comparison Chart]/Headers/*


2

You can use something like this in your template field source (You would need to change the templateid value to be the actual ID of your comparison chart template ID ): query:./ancestor-or-self::*[@@templateid='{Comparison Chart Template ID}']/Headers/* Or another way using the parent folder name query:./ancestor-or-self::*[@@name='Comparison Chart']/...


2

I didn't see an Add method in the InProcItemModelRepository when overriding the class mentioned above (overriding Add is mentioned in the linked question). I overrode the CreateItem method to have the default code with a few checks marked with comments as custom code as follows: namespace Common.CustomSitecore.DataExchange.Repositories { public class ...


1

There are many ways to go about it. You could add all the language versions you need for your Branch Template items, and add Presentation Details for all of them. Alternatively you could edit the Shared Layout as opposed to the Final Layout in Experience Editor. Find it under the Presentation ribbon.


1

You can do it by implementing a custom pipeline that will change Data Sources on all renderings when new branch template is instantiated. So it will adjust all the paths for renderings to point to a newly created sub items. See more here: https://kamsar.net/index.php/2016/03/Branch-Datasource-Presets/ Note: there was some sort of small bug that would not ...


1

What is the purpose of Gallery component? Does it holds empty placeholder only? If I understand your approach you want to add Gallery Item renderings to that empty placeholder once you create data source from branch. I am not sure if this is the right approach to build composite components, because there is no simple way to do this. Normally you would add ...


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