c# 4.0 - How to insert an empty folder with desired name under an item in Sitecore programmatically? -
i need create empty folders in each sections (content, layout, renderings, medialibrary, templates) under sitecore node programmatically.
please advise.
a folder in sitecore item, example template: /sitecore/templates/common/folder {a87a00b1-e6db-45ab-8b54-636fec3b5523}
so need code add item:
see: how programmatically populate sitecore items (add item , fields)?
https://briancaos.wordpress.com/2011/01/14/create-and-publish-items-in-sitecore/
http://learnsitecore.cmsuniverse.net/en/developers/articles/2009/06/programaticallyitems2.aspx
for example under layout folder can use other template, template: /sitecore/templates/system/layout/renderings/sublayout folder there more folder templates, , of course can create own, , adding insert options need or set nice icoon in standard values.
summarized:
- you need privileges create sitecore item, can use securitydisabler or user switcher.
- get parent item.
- create item template want.
Comments
Post a Comment