Exemplo n.º 1
0
		public ActionResult Insert(InsertModel im) {
			EditModel pm = null ;

			if (im.OriginalId != Guid.Empty)
				pm = EditModel.CreateByOriginalAndPosition(im.OriginalId, im.ParentId, im.Seqno, im.SiteTreeId, im.SiteTree) ;
			else pm = EditModel.CreateByTemplateAndPosition(im.TemplateId, im.ParentId, im.Seqno, im.SiteTreeId, im.SiteTree) ;

			ViewBag.Title = Piranha.Resources.Page.EditTitleNew + pm.Template.Name.ToLower() ;

			// Executes the page list loaded hook, if registered
			if (WebPages.Hooks.Manager.PageEditModelLoaded != null)
				WebPages.Hooks.Manager.PageEditModelLoaded(this, WebPages.Manager.GetActiveMenuItem(), pm) ;

			if (im.OriginalId != Guid.Empty)
				return View(@"~/Areas/Manager/Views/Page/EditCopy.cshtml", pm) ;
			return View(@"~/Areas/Manager/Views/Page/Edit.cshtml", pm) ;
		}
Exemplo n.º 2
0
        public ActionResult Insert(InsertModel im)
        {
            EditModel pm = EditModel.CreateByTemplateAndPosition(im.TemplateId, im.ParentId, im.Seqno) ;
            ViewBag.Title = Piranha.Resources.Page.EditTitleNew + pm.Template.Name.ToLower() ;

            return View("Edit", pm) ;
        }