mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Adding content item name and link helpers
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4041610
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
using System.Web.Routing;
|
||||
using Orchard.Models;
|
||||
|
||||
namespace Orchard.Wikis.Models {
|
||||
public class WikiPage : ContentPartForRecord<WikiPageRecord> {
|
||||
|
||||
public class WikiPage : ContentPartForRecord<WikiPageRecord>, IContentItemDisplay {
|
||||
|
||||
string IContentItemDisplay.DisplayText {
|
||||
get { return Record.Name; }
|
||||
}
|
||||
|
||||
RouteValueDictionary IContentItemDisplay.DisplayRouteValues() {
|
||||
return new RouteValueDictionary(new { area = "Orchard.Wikis", controller = "Page", action = "Show", id = ContentItem.Id });
|
||||
}
|
||||
|
||||
RouteValueDictionary IContentItemDisplay.EditRouteValues() {
|
||||
return new RouteValueDictionary(new { area = "Orchard.Wikis", controller = "Page", action = "Edit", id = ContentItem.Id });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user