Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Lynicon's editor system is a generic and adaptable way of providing editing of the data stored in the Data API. Essentially, a DataRoute processing a request uses an inheritor of EditorRedirect (chosen by the type of data being requested) to decide whether the request should be diverted to a special controller.  This controller (which will normally inherit from EditorController) creates a page with form elements which when posted back, are used to update the relevant content item via model binding.

Setting the Editor to use for a Route or Content Type

By default, DataRoute uses ContentEditorRedirect which redirects to DualFrameEditorController.  This supports the standard page editor.

You can change this behaviour per type or per DataRoute.  To change the EditorRedirect used for a DataRoute, do this:

 

regContext.Routes.AddDataRoute<List<Comment>>("comment-mod-list", "lynicon/comment-mod-list",
  new { controller = "Comment", action = "Moderate" },
  new WebEditorRedirect(User.EditorRole, User.EditorRole, User.EditorRole,
  cl => CommentManager.Instance.AddUrlToComments(CommentManager.Instance.HydrateComments((List<Comment>)cl)), null));


  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.