protected virtual string GetEditUrl(MagicLocation location) { return Edits.GetEditNewPageUrl(location.Location, location.GetDefinition(Definitions), location.ZoneName, CreationPosition.Below) + "&template=" + location.ContentTemplate; }
public Items.MagicLocation AddLocation(ContentItem location, string discriminator, string templateKey, string title, string zone) { ContentItem wonderland = containers.GetOrCreateBelowRoot((container) => { container.Title = WizardSettings.Title; container.Name = WizardSettings.Name; container.ZoneName = WizardSettings.ZoneName; }); Items.MagicLocation ml = Context.Current.Resolve<ContentActivator>().CreateInstance<Items.MagicLocation>(wonderland); ml.Location = location; ml.ItemDiscriminator = discriminator; ml.ContentTemplate = templateKey; ml.Title = title; ml.ItemZoneName = zone; persister.Save(ml); return ml; }