Questions tagged [templates]

Questions about working with Sitecore templates - base templates, data templates, field sources, ...

Filter by
Sorted by
Tagged with
0 votes
1 answer
61 views

Unit testing logic with Template.InheritsFrom [closed]

Problem Is there a way to mock Template.InheritsFrom using NSubstitute? This is needed in order to be able to test logic that depends on the presence of a base template in the inheritance chain. In ...
Dan Solovay's user avatar
  • 2,001
0 votes
1 answer
42 views

How to add restriction to a Template Field so that it ll show/hide based on selected language version [duplicate]

I just want to show a template field to content editor when Poland language version is selected for the item. and want to not show that field if Romania language is selected. Can someone pls suggest ...
Rashmi Ranjan's user avatar
0 votes
1 answer
31 views

Load value dynamically in edit component properties window

I have a checkbox field(includelevel2) and I need to load the value dynamically in a droptree field(parent folder) based on the checkbox event. Is it possible to achieve because both the fields are ...
UserSc's user avatar
  • 1
0 votes
1 answer
60 views

Can't read Tag title

I can't read tag title in scriban in sitecore while I can reach out the path and the display name correctly the code I use to read title: indTags = i_item.ProductIndustryTags.targets {{- for ind in ...
Sara Elgendy's user avatar
0 votes
0 answers
36 views

JSON template in Sitecore 10.1

Is there any alternate to JSON template in Sitecore 10.1?. We migrated to Sitecore 10.1 from Sitecore 8. One of the Rendering Variants is JSONResults, which includes JSON Template inside JSONResults. ...
Owais Ahmed's user avatar
0 votes
2 answers
216 views

How can I add a component to already existing pages?

I am working on Sitecore Version 9.0.1. I am looking to add a component to already existing pages. Since there are 100s of pages of this type, I was thinking to add component rendering to the ...
Akshay Mahajan 's user avatar
0 votes
2 answers
91 views

Template's Standard Values Layout Details removed during deployment

Sitecore 10.2 with SXA We are facing an unexpected issue when after each deployment a few of the template's Standard Values in Layout Details get removed. As a result this removes all components from ...
Jumping Rabbit's user avatar
5 votes
1 answer
123 views

Standard value field in template not reflecting in Context.Item

I have an existing template, Template E. This template inherits a base template, Template B. Template B has two checkbox fields. In Template E's standard value, I have checked the inherited checkbox ...
Visva Kiruthika Muthuraj's user avatar
1 vote
1 answer
85 views

Is there some way to measure number of items read per item in the Content Editor

I'm wondering if there is any diagnostic tool, or technique which can be used to work out how many items are read from the DB for each item loaded in the content editor. I'm thinking of a Content ...
Matthew Dresser's user avatar
0 votes
1 answer
215 views

Looking for powershell script that looks through Template files and updates them

So we have added multiple publishing DBs on our system that have an error deploying template files on deployments. I have a feeling its because the "Publishing Targets" are blank. When I ...
user1566783's user avatar
1 vote
1 answer
161 views

Rendering variant does not render data if template is changed

Scenario: I have a template that has shared fields, now I got the requirement to provide multilingual support in few components. I can't change the shared field because data should be shared in other ...
Imad's user avatar
  • 235
0 votes
1 answer
59 views

Best practice to create a template similar to existing but with different "Shared" value

I am using SXA Map component on my page and using one template "Office POI". This template have shared fields like Street, City, Pin etc. Items created on this template works perfectly on ...
Imad's user avatar
  • 235
2 votes
2 answers
1k views

How to specify a datasource for a droplist field in sitecore 8.0 template

I am using Sitecore 8.0 where I have created a template with field droplist field type and I want to give datasource for it where it references another template datasource. And we have Multiple Sites ...
Vinaya's user avatar
  • 321
0 votes
0 answers
343 views

Powershell script to update the template but to retain all renderings and fields

I need to change the template of multiple items in a folder but need to retain the field values and rendering and layout details. I was able to change the template and retain the field values. But how ...
Visva Kiruthika Muthuraj's user avatar
0 votes
1 answer
107 views

Change the template and retain the field value (internal link to a general link)

I have a template and it is inherited. I have a field called website. I need to change the website field from internal link to a general link. When i do that, I loose all the values. How can i retain ...
Mr Sumo's user avatar
  • 113
1 vote
2 answers
510 views

Site specific source for droptree field type

I have an sxa multisite solution where a template has been used across 2 sites. The template has a droptree field with source in template as /sitecore/content/tenant/site1/data/tag. However, when I ...
Roger's user avatar
  • 11
1 vote
1 answer
115 views

Checkbox showing on Bizfx but not in Sitecore

I am able to see Checkbox on Bizfx but when I do the Update Data Templates in Sitecore then its showing Single-Line Text rather than a Checkbox This is the code to add a property. I have declared it ...
user avatar
1 vote
2 answers
287 views

Command template not available on the home item's insert options

I have created a command template and I want to create an item using that command template under the home item. I have assigned that command template on the insert options of the home item's template ...
Jumping Rabbit's user avatar
0 votes
1 answer
283 views

Programmatically get source of a Template Field

I have field in Template like Multilist with Search and Treelist with search. In these fields in the source a start search location is specified as below: I need to find out all templates ...
Debaparna's user avatar
  • 497
1 vote
1 answer
275 views

I need to add SXA Page Content component to standard values of template

I created a custom template to use with the SXA Page Content component. On the standard values > presentation > details, I selected the Page Content control and I want to use a custom variant (...
shimaa elsayed's user avatar
0 votes
1 answer
186 views

What is the best JSS template field naming convention

What is the best practice for naming the template fields in Sitecore JSS? Layout service is not making any changes to the filed names when returning JSON response so it seems quite natural to use ...
9_9's user avatar
  • 121
0 votes
1 answer
137 views

Sitecore Powershell script for moving bunch of fields to template section

We are trying to refactor few of the Sitecore templates. We need some help with powershell script. Is there any way to pull bunch of fields (around 70-80) to different template sections. Manual pull ...
Rishi's user avatar
  • 1
0 votes
1 answer
39 views

Select Template before create Promo

I have multiple promo template in template folder, may i know how to allow user to select a promo template before they create a promo in Experience editor? This is my Promo Template. But in ...
New Developer 2017's user avatar
1 vote
1 answer
370 views

Clone SXA Carousel; Unable to change the Carousel Slide Item rendering variant

I'm working to create a clone of the Carousel Composite component. I've been able to update the Datasource and Rendering parameter templates for my use cases. However, I'm unable to change the ...
Derek Port's user avatar
1 vote
1 answer
177 views

Is it possible that two items based on the same template will not have the same fields?

I think ideally it is not possible but got confused when reading Sitecore's 9.3 learning module where this scenario is marked as true. I wanted to inform on this but before doing so thought of ...
Anupam Baksi's user avatar
3 votes
0 answers
40 views

How can a previously removed component be fully restored from standard values?

When a component coming from a template has been removed from a page item, it can be restored by resetting layouts from standard values. However, if changes are made to the component at the template ...
ecorry's user avatar
  • 51
2 votes
0 answers
42 views

Why are page components getting bumped to bottom of components list after template is deployed?

After a particular template is deployed during a release, page level components are getting bumped to the bottom of the components list on page final layout. We've pulled that template from getting ...
ecorry's user avatar
  • 51
3 votes
1 answer
411 views

JSS Field naming convention

Will or should Sitecore automatically sanitize field names when serialising them as part of the layout service or do we need ensure we define fields in Sitecore using a consistent format? e.g. would "...
j_r's user avatar
  • 143
2 votes
2 answers
268 views

Set the field value always to "en" language version value when setting the field from versioned field to shared field

Setting an existing field "shared" from "versioned" on the template always sets the most recent language version value for that field in the items of that template type. Is there some way to always ...
Dhananjay Kurekar's user avatar
3 votes
1 answer
2k views

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

I had created a template in Sitecore 9.0.2 named as XYZ, and had a field in that named as "Test". Now the client wants to change the name of the field "Test" to "Test1". I changed the display name ...
Shomila's user avatar
  • 45
1 vote
1 answer
989 views

Multilist datasource query that filters only items where a field contains the ID of the item being edited

Here's the scenario. We have a list of FAQs and each FAQ can be assigned to one or more categories. This is done via a Multiselect in the FAQ item template. But we are now redesigning our FAQ ...
Levi Wallach's user avatar
  • 1,085
1 vote
1 answer
39 views

Templatized Personalization that is configurable by content authors

I have clients who would like to put personalization on components that exist on a multitude of pages, like a side bar on thought leadership or news, to get the most visibility of the personalization. ...
Jaina Baumgartner's user avatar
1 vote
1 answer
286 views

Enforce Site-Wide Alternate Text Validation On General Link Fields

I am working on Sitecore version 9.1. When attempting to insert a link using the general link field, the user is prompted to enter the following information: In an effort to enforce accessibility on ...
c-bro's user avatar
  • 557
1 vote
1 answer
234 views

How to get Sitecore template branches to use default language?

We are trying to use Sitecore template branches to create templates for different pages, i.e. "About us", "Contact", "Faq" etc. In that way, we hope to ease the job of the Sitecore editor, when they ...
Hos's user avatar
  • 884
1 vote
1 answer
285 views

page template and his base template instance items

I have an Item in Sitecore, and I know it's derived from a certain base template. I have that base template ID, but I want to get the instance of this base template that is part of my page. I want it ...
grandeale83's user avatar
1 vote
1 answer
377 views

How do I create datasource for field type Name Value List?

I feel like I'm missing something obvious - but I want to use the Name Value List field type so the user can select from a list of values. How/where do I create the dynamic values that would populate ...
Jen's user avatar
  • 1,393
2 votes
1 answer
227 views

Setting subitem sorting value on Template?

Using Sitecore 9.1.1 SXA 1.8.1. I have a page type where I want its children to always be sorted in reverse. I know that I can select the page and apply the sorting that way: I was hoping I could ...
Jen's user avatar
  • 1,393
1 vote
2 answers
56 views

Base Templates are deployed without any language version

We have very bizare issue with our deployment. Project contains of multiple templates and we recently (couple of months ago) introduced couple of base templates. We have prefixed them with underscore,...
gringo_dave's user avatar
4 votes
0 answers
193 views

Is it possible to inherit insert options from multiple base templates?

I'm trying to inherit insert options from two templates. I created a template item and set both of the templates as base templates in the Data section. However, only the first base templates insert ...
user6883624's user avatar
0 votes
1 answer
169 views

Is there a pipeline/processor or way to have dynamic Field Titles for fields shared across multiple templates?

Preamble: Sitecore supports having content editors see a customized field title, however this field title is shared across every item that inherits this item. For Image Fields I'd like to indicate ...
Adam Hess's user avatar
  • 354
2 votes
1 answer
269 views

Standard template fields not showing in inherited templates

I have created a template which inherits the standard template. Then I created an item using this template but the item not showing any fields from the standard template. Is there anything more I need ...
Reshma's user avatar
  • 133
3 votes
1 answer
452 views

Enabling Item Language Fallback for SXA component datasources

In our Sitecore instance we have a number of different languages, and we have enabled item level language fallback. We have enabled item level fallback on all of our page templates, and this works as ...
LukasEngedalNC's user avatar
-1 votes
1 answer
142 views

Is it possible to link all contents of a media folder on a page?

New to working with sitecore, and not really sure if what I'm looking into trying to do is even possible. I certainly can't figure it out myself. In short, I want a page which will list all the ...
ErikM's user avatar
  • 99
5 votes
2 answers
2k views

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

I have a date field in one of my templates who's default value is $date. When I create an item using that template, the raw value is 20190522Z, but when I view it not raw I see it as yesterday's date ...
Levi Wallach's user avatar
  • 1,085
3 votes
1 answer
1k views

Sorting Template Sections from inherited Base Templates

Sitecore 9.1 installation. I have a template called Person. This template has a number of Sections defined in the Template itself, and some that are inherited from Base Templates. One said Base ...
Emanuele Ciriachi's user avatar
1 vote
1 answer
97 views

What is the most basic kind of item/template that can exist in Sitecore?

I have a need to store simple string values in the Sitecore content tree. I am thinking i'd like to create the most basic kind of Sitecore item with the least amount of fields. But, if I select [...
AmoebaMan17's user avatar
1 vote
0 answers
641 views

What is the importance of setting up icons on templates [closed]

I was looking up what the competencies are for Sitecore 9.1 examination and stumbled upon this blog where one of the stated competencies under Templates is as followed: State the importance of ...
Anh-Duc's user avatar
  • 159
2 votes
1 answer
398 views

Inherit child template to the parent template using Powershell

I have 2 templates: Template A: PersonalTemplate Template B: PrivateTemplate Here I want to inherit Template B in Template A using the PowerShell script.
PSS's user avatar
  • 607
1 vote
0 answers
306 views

MultiList with Search not showing items for non-admins

There is a related item that suggests providing read access to /sitecore/system/Settings/Buckets/Item Buckets Settings, which I've done. That at least removes the loading icon from the left shuttle ...
Levi Wallach's user avatar
  • 1,085
1 vote
1 answer
544 views

How to bulk-create template items automatically?

In Sitecore project, how would you bulk-create template items? What we usually do is to write internal-design document, which defines Item Name, Item Path, Section Name, and Field Name in Excel ...
TestUser's user avatar
  • 375