Ejemplo n.º 1
0
 protected virtual string GetEditUrl(MagicLocation location)
 {
     return Edits.GetEditNewPageUrl(location.Location,
         location.GetDefinition(Definitions),
         location.ZoneName,
         CreationPosition.Below) + "&template=" + location.ContentTemplate;
 }
Ejemplo n.º 2
0
 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;
 }