mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Refactoring ContentItemExtensions
The usage of the optional parameter was not working correctly on my setup.
This commit is contained in:
@@ -14,10 +14,18 @@ namespace Orchard.Mvc.Html {
|
||||
return MvcHtmlString.Create(html.Encode(metadata.DisplayText));
|
||||
}
|
||||
|
||||
public static MvcHtmlString ItemDisplayLink(this HtmlHelper html, IContent content, object htmlAttributes = null) {
|
||||
public static MvcHtmlString ItemDisplayLink(this HtmlHelper html, IContent content) {
|
||||
return ItemDisplayLink(html, null, content, null);
|
||||
}
|
||||
|
||||
public static MvcHtmlString ItemDisplayLink(this HtmlHelper html, IContent content, object htmlAttributes) {
|
||||
return ItemDisplayLink(html, null, content, htmlAttributes);
|
||||
}
|
||||
|
||||
public static MvcHtmlString ItemDisplayLink(this HtmlHelper html, string linkText, IContent content) {
|
||||
return ItemDisplayLink(html, linkText, content, null);
|
||||
}
|
||||
|
||||
public static MvcHtmlString ItemDisplayLink(this HtmlHelper html, string linkText, IContent content, object htmlAttributes = null) {
|
||||
var metadata = content.ContentItem.ContentManager.GetItemMetadata(content);
|
||||
if (metadata.DisplayRouteValues == null)
|
||||
|
||||
Reference in New Issue
Block a user