OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.38k stars 1.12k forks source link

short news and full news #387

Open orchardbot opened 14 years ago

orchardbot commented 14 years ago

igeek created: https://orchard.codeplex.com/workitem/16554

It would be good to see cutting tag, that divide full news and short news

some text

more text
orchardbot commented 13 years ago

rpaquay commented:

Bertrand, can you figure out what this means? It this a new feature, what feature exactly?

orchardbot commented 13 years ago

@bleroy commented:

The feature is something that exists in WordPress and other blog engines and something that LiveWriter can handle. You insert a special marker in your blog post's text and the system understands that what is before the marker is the summary version, and the full version is everything that's before and after the marker. http://codex.wordpress.org/Customizing_the_Read_More

orchardbot commented 13 years ago

@heskew commented:

We discussed a while back an implementation that would involve in part using to mark the cutoff for the excerpt.

http://orchard.codeplex.com/workitem/15727?ProjectName=orchard

orchardbot commented 13 years ago

rpaquay commented:

This is a new feature we won't have time to implement for V1.0. A patch would be welcome though :)

orchardbot commented 13 years ago

@bleroy commented:

A theme can implement that by including the following Views/Parts.Common.Body.Summary.cshtml:

@{ Orchard.ContentManagement.ContentItem contentItem = Model.ContentPart.ContentItem; var bodyHtml = Model.Html.ToString(); var more = bodyHtml.IndexOf(""); if (more != -1) { bodyHtml = bodyHtml.Substring(0, more); } else { var firstP = bodyHtml.IndexOf("

"); var firstSlashP = bodyHtml.IndexOf("

"); if (firstP >= 0 && firstSlashP > firstP) { bodyHtml = bodyHtml.Substring(firstP, firstSlashP + 4 - firstP); } } var body = new HtmlString(bodyHtml); }

@body

@Html.ItemDisplayLink(T("Read more...").ToString(), contentItem)

\ Closed by BertrandLeRoy 03/25/2011 3:34PM

orchardbot commented 13 years ago

@bleroy commented:

Could be nice to implement in TinyMCE as a button, and as a capability for LiveWriter.