Ejemplo n.º 1
0
        //-------------------------
        // Present the displayed node for editing.
        // Called by NodeDisplayFormProcess.
        //-------------------------
        private ActionResult NodeEditBegin(int id)
        {
            if (id == 0)
            {
                return(RedirectToAction("/Display"));
            }

            ContentNode node = contentManager.ContentGetById(id);

            NodeEditViewModel model = new NodeEditViewModel
            {
                Content = node.Content,
                Create  = false,
                Id      = node.NodeId,
                Path    = node.Path,
                Summary = node.Summary,
                Title   = node.Title,
                Type    = node.Type
            };

            ViewBag.Title = "Edit: " + model.Path;
            return(View("NodeEdit", model));
        }