23 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; $...
user avatar
  • 2,608
21 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 ...
user avatar
  • 18.8k
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 ...
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/...
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 ...
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 ...
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 ...
user avatar
  • 24.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 ...
user avatar
  • 6,426
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 ...
user avatar
  • 24.3k
11 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 ...
user avatar
  • 4,114
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 ...
user avatar
10 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
user avatar
  • 19.1k
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 ...
user avatar
  • 12.9k
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.
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 ...
user avatar
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 ...
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 ...
user avatar
  • 24.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 ...
user avatar
  • 16.4k
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 ...
user avatar
  • 24.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 ...
user avatar
  • 18.8k
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. ...
user avatar
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 ...
user avatar
  • 5,055
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 ...
user avatar
  • 13.6k
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 ...
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 ...
user avatar
  • 18.8k
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="" />
user avatar
6 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 ...
user avatar
  • 16.4k
6 votes
Accepted

Should we create project layer templates in a Helix solution using SXA

When you are creating new Tenant and Site in SXA we have it automated with our scaffolding logic, you will find actions to create tenants and sites and they basically do all the work for you. You don'...
user avatar
6 votes
Accepted

Can I modify Standard Values variables, such as $name, to be all lowercase?

Yes, but not OOTB. You would need to roll a custom token. Maybe something like $namelower. To do this you would extend the ExpandInitialFieldValueProcessor Here is an example: using Sitecore....
user avatar
  • 18.8k
6 votes
Accepted

How to setup child templates by default

welcome to SSE. If I'm understanding your question right, it sounds like you need to use branch templates to do this. A branch template will allow you to set a predefined tree structure, like a ...
user avatar
  • 18.8k

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