开发者

Using Orchard CMS how do I change the heading displayed in the list of content items

开发者 https://www.devze.com 2023-03-13 09:44 出处:网络
I have created a new module in Orchard CMS, i have a new event part that has a whole 开发者_如何学Cbunch of custom fields.How do i change the heading displayed in the list of content?

I have created a new module in Orchard CMS, i have a new event part that has a whole 开发者_如何学Cbunch of custom fields. How do i change the heading displayed in the list of content?

Thanks

Using Orchard CMS how do I change the heading displayed in the list of content items


It is possible to set the meta data in the Handler

protected override void GetItemMetadata(GetContentItemMetadataContext context)
{
    // We will set the display text, appears in content list
    var e = context.ContentItem.As<EventPart>();
    if (e != null)
    {
        context.Metadata.DisplayText = e.Name;
    }
}


You could use the ITitleAspect method:

public interface ITitleAspect : IContent {
    string Title { get; }
}

As seen in David Hayden's fine post.

0

精彩评论

暂无评论...
验证码 换一张
取 消