This project is read-only.

How to hide "more" link from body part.

Topics: General
Sep 24, 2012 at 9:23 PM

I have the body part attached to anything where the content provider will have to enter information but, when it is rendered in the site I see the "more" link at the bottom and I'd like to know how to hide it so I can control when that link shows up.


Sep 24, 2012 at 11:15 PM
Edited Sep 24, 2012 at 11:15 PM

override the body summary template in your theme.

Sep 24, 2012 at 11:38 PM
Edited Sep 25, 2012 at 12:15 AM

Thank you.

Sep 25, 2012 at 12:15 AM

Now I have this problem

@if(Model.Html.ToString().Length > 200) {
    @Orchard.Mvc.Html.ContentItemExtensions.ItemDisplayLink("more", Model.ContentItem)

I get this error

The best overloaded method match for 'Orchard.Mvc.Html.ContentItemExtensions.ItemDisplayLink(System.Web.Mvc.HtmlHelper, Orchard.ContentManagement.IContent)' has some invalid arguments

Sep 25, 2012 at 3:46 AM

as the msg said:'Orchard.Mvc.Html.ContentItemExtensions.ItemDisplayLink(System.Web.Mvc.HtmlHelper, Orchard.ContentManagement.IContent)' 

u should change string "more" to System.Web.Mvc.HtmlHelper

Sep 25, 2012 at 8:03 AM

No, it should be 

@Html.ItemDisplayLink("more", Model.ContentItem)
Sep 25, 2012 at 7:08 PM
Edited Sep 25, 2012 at 7:10 PM

here's what I ended up doing.

@if (Model.Html.ToString().Length > 200) {
    @Orchard.Mvc.Html.ContentItemExtensions.ItemDisplayLink(Html, "more", Model.ContentItem)
else {

Thank you for your help. I had to use the whole namespace because it was throwing an error saying it could not use the extension method when I tried doing Html.ItemDisplayLink.