Create, Delete & Modify Items

Fortis not only allows you to read items from Sitecore but also manage them with the strongly typed objects. The following examples show how you can create, modify, delete and publish items.

Wallingford Center free blackjack no deposit bonus Create

public class MyProvider
{
	private readonly IItemFactory _itemFactory;

	public MyProvider(IItemFactory itemFactory)
	{
		_itemFactory = itemFactory;
	}

	private void Run()
	{
		IPage item = _itemFactory.Create<IPage>(/* Guid or path */, "Item Name");
	}
}

Sāyla bossier city gay dating city Modify

IPage item = _itemFactory.GetContextItem<IPage>();

item.Title.RawValue = "Amended Title";
item.Save();

best online betting Delete

IItemWrapper item = _itemFactory.GetContextItem<IItemWrapper>();

item.Delete();

http://balacatering.com/16-cat/casino_5.html Publish – Single Item

IItemWrapper item = _itemFactory.GetContextItem<IItemWrapper>();

item.Publish();

https://ebonytoastmasters.org/21-cat/dating_18.html Publish – Multiple Items

IItemWrapper item = _itemFactory.GetContextItem<IItemWrapper>();
IEnumerable<IItemWrapper> children = item.Children<IItemWrapper>();

_itemFactory.Publish(children);

online gay dating berea oh Next: Rendering Parameters