Skip to main content
24 votes
Accepted

How to change item templates and retain existing data

You can do this with Sitecore PowerShell Extensions. PowerShell Extensions 4.5 or Higher Use the Set-ItemTemplate commandlet with the -FieldsToCopy parameter. $rootItem = Get-Item master:/content; $...
Corey Smith's user avatar
  • 2,728
22 votes
Accepted

Deleting an Item with a null Template

A safer method would be to use the DbBrowser. You can find this by going to <yoursiteurl>/sitecore/admin/dbbrowser.aspx. You will get a screen where the content tree loads up on the left and you ...
Richard Seal's user avatar
  • 20.6k
18 votes

How to change item templates and retain existing data

You can rename Title2 to match name of Title1 and then simply change the template. Sitecore will preserve data if the names of the fields match. Template A Title1 Single-Line Text SubText1 ...
Szymon Kuzniak's user avatar
18 votes
Accepted

How to delete data templates?

This seems like a perfect taks for Sitecore Powershell Extensions First of all I would get a list of template IDs to remove $templateIds = Get-ChildItem /sitecore/templates/you/better/know/where/to/...
Szymon Kuzniak's user avatar
17 votes
Accepted

SXA Page Design vs Page Standard Values vs Page Branch Template

With Sitecore Experience Accelerator you can forget about previous methods, however, there is nothing that will block you from using them. Before - NO SXA: you had to decide how your page will look ...
Alan Płócieniak's user avatar
17 votes
Accepted

How to remove a language version of a data template?

Sitecore doesn't expose the version manager [you've shown] on templates. However, you can use the DB Browser (~/sitecore/admin/dbbrowser.aspx) and manage items, templates, etc. that way. Simply point ...
Brad Christie's user avatar
16 votes

what will happen when a field is marked as both Shared and Unversioned

In reality, you have only 3 options. However the combination of checkboxes gives you 4. The Answer A versioned field (default) This acts like one would expect. The field can have multiple values and ...
Mark Cassidy's user avatar
  • 25.3k
14 votes
Accepted

How to apply Site specific workflow in Sitecore?

If the workflows are not drastically different, you can achieve 'site-specific' workflow via content security. Step 1: Workflow security Create a single workflow definition with some generic access ...
Jason St-Cyr's user avatar
  • 6,791
12 votes
Accepted

What happens if the same field name is used in two separate inherited data templates?

Sitecore stores fields for templates as individual Items. As they are Items, they have a unique ID that can identify them. When Sitecore stores the values of fields for an item (most commonly in the ...
Kasaku's user avatar
  • 4,184
11 votes
Accepted

Setting up a source using ID and limiting the items you can select. is it possible?

You can use the ID instead of the path in your initial source: DataSource={C46A-4...CE}&ExcludeTemplatesForSelection=Bar
Gatogordo's user avatar
  • 20.2k
11 votes
Accepted

TemplateManager.GetTemplates always returning null

Yea. Change your code to this: var templatePath = "User Defined/Project/Common/Content Types/Links"; var template = TemplateManager.GetTemplate(templatePath, Context.Database); If your path starts ...
Mark Cassidy's user avatar
  • 25.3k
11 votes
Accepted

What is the difference between default value of a template and it's standard value in Sitecore?

From my understanding Default Value In the definition item for each data template field, you can specify a value for the Default value property. When a user creates an item, Sitecore copies the ...
Hishaam Namooya's user avatar
10 votes
Accepted

Is it okay to add fields to Standard Template or add Base Templates to it?

Whenever I do this, I create a new template that I inherit. If wanted to add a new field called widget, I would create a new _template called _widgetdata (notice the _ to dictate the fact that this ...
Chris Auer's user avatar
  • 13.1k
9 votes
Accepted

Field names in content editor are wrong (multiple colons and no capitalisation) but fine in VS

It sounds like you have a matching item in /sitecore/System/Dictionary/. I did a quick test by adding a Dictionary item that matches the name of a field and the Content Editor picks it up.
Jonas Hamnered's user avatar
9 votes

Multiple templates sections with same name

Template field sections are for grouping purposes only. It doesn't matter if there are multiple sections with the same name. If there are multiple sections with the same name, Sitecore will display ...
Marek Musielak's user avatar
  • 24.1k
9 votes

What is the difference between default value of a template and it's standard value in Sitecore?

It is a quite interesting question. I've never thought about it. I fully agree with previous answer except using tokens. Tokens can be used in the Default Value as well as in the Standard Value. I ...
Artem Prashkovich's user avatar
9 votes
Accepted

When to use Number vs Integer field type

The main difference is, one stores an Integer and one stores any number, e.g. 12.50. There are a couple of caveats. The decimal separator is different between countries. And Sitecore's default input ...
Mark Cassidy's user avatar
  • 25.3k
9 votes
Accepted

Template inheritance - how to resolve duplicate usage

A solid option is to build components that have a data source item rather than relying purely on fields defined on the page. Here's a scenario to help explain what I mean: Let's say you need to ...
Michael West's user avatar
  • 18.5k
8 votes
Accepted

How to use a Helix feature for multiple sites with specific template source settings per site?

You're going about it wrong. Or - I should say - not in accordance with Helix principles. First and foremost, your idea of a common base template to be used on all websites is not recommended ...
Mark Cassidy's user avatar
  • 25.3k
7 votes
Accepted

Best way to add rendering in base template and inherit

If you have not already used a base template with presentation, this will be tricky. Normally I would have a base page template with some core presentation elements and then all other page templates ...
Richard Seal's user avatar
  • 20.6k
7 votes

Standard values on base templates

Standard values are default field values used as fallback, if the item does not have a field value defined. If your item has a field value (even an empty field value), the standard value is ignored. ...
Kasper's user avatar
  • 2,156
7 votes
Accepted

Get all items where a certain template appears in its template inheritance

Sitecore PowerShell Extensions At first your question made me think of this where the user wants to find media items of a certain length. I encourage you to check that out to see some different ways ...
Michael West's user avatar
  • 18.5k
7 votes
Accepted

Can you prepopulate an image field with an existing image?

This is what Standard Values are for. You can set the value of the field on the __Standard Values item underneath the template of the item you're creating (or a base template, if you prefer): If the ...
Dan Sinclair's user avatar
  • 5,425
7 votes
Accepted

Sitecore populating date field with yesterday's date via $date token

The difference between $date and $now is contained within the Sitecore.Data.ReplaceValues method: protected virtual string ReplaceValues(string text, Func<string> defaultName, Func<string>...
jrap's user avatar
  • 4,971
7 votes

Sitecore populating date field with yesterday's date via $date token

Based on @jraps research, this is what I believe is happening: $date is taking the current UTC date and storing that in the DB - if you are in UTC-4 and you create the date when the UTC date has ...
Richard Seal's user avatar
  • 20.6k
7 votes
Accepted

Changing the display name of field in the template does not reflect the name at item level

Your understanding is not correct. It is indeed the Title field which is displayed above the Field in the Content Editor. By default, this is set to the Field’s name, but you may change the value if ...
Gatogordo's user avatar
  • 20.2k
6 votes
Accepted

Force template versions in English

In a clean install of Sitecore 8.1 update-3, the templates and their related sections/fields are always created in English, no matter what language the user may be working in from the ribbon: But if ...
jammykam's user avatar
  • 13.9k
6 votes
Accepted

Override the source of a template field

Branching off of @SzymonKuzniak's answer, the simple answer is "no" but the complex answer is "yes, with some trickery, by tapping into the getLookupSourceItems pipeline." In order to minimize ...
Zachary Kniebel's user avatar
6 votes

How to remove a language version of a data template?

Another way to do this is using Sitecore Powershell Extenstions. There is a cmdlet called Remove-ItemLanguage, this removes the specified language version from the item. Example that removes the ...
Richard Seal's user avatar
  • 20.6k
6 votes

Sitecore General Link linking to itself (internal item) by default

Try putting the below in the standard value's raw values: <link text="link text" linktype="internal" class="" title="" target="" querystring="" id="$id" anchor="" />
Andrey Bobrov's user avatar

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