2
votes

i am creating an item in the sitecore[Item A] programmatically.I would like to assign one more template in the standard values of [Item A]._Standard values item is not getting displayed under ItemA.Is there any option to set the visible settings for __Standard values?

enter image description here

myItem.Template.CreateStandardValues(); //This is how am creating
1
Am not really sure what you're asking here? Are you creating a content item programatically, or trying to create templates (with corresponding standard values) programmatically?Mark Cassidy
What do you mean "assign one more template in the standard values of [Item A]"? What are you trying to assign, a base template?jammykam

1 Answers

4
votes

Assuming that your item from the tree ('test') in your code is stored in variable myItem, your code for creating Standard Values for this item template is absolutely fine.

Still you need to remember that Standard Values are created for Template items only so if you want to see the Standard Values you've created, you need find the Template item for the test (just click on this item and follow the Template link in the Quick Info section) item and there should be a child item of the Template called __Standard Values.