Please ignore this, somehow the message got scrabbled?

-----Original Message-----
From: Bertrand Le Roy [mailto:bertrand.le....@microsoft.com] 
Sent: 10 October 2011 22:08
To: orchard-discuss@lists.outercurve.org
Subject: RE: Image part of blog entry summary

What do you mean?

-----Original Message-----
From: Johan Pieterse [mailto:johan...@microsoft.com] 
Sent: Monday, October 10, 2011 2:36 AM
To: orchard-discuss@lists.outercurve.org
Subject: RE: Image part of blog entry summary

Accept-Language: en-ZA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.166.18.93]
Content-Type: multipart/alternative;
        boundary="_000_AEF502B15F903A48BB5D1CD8D797BDCA187886E8DB3EX14MBXC303e_"
MIME-Version: 1.0
Return-Path: johan...@microsoft.com

--_000_AEF502B15F903A48BB5D1CD8D797BDCA187886E8DB3EX14MBXC303e_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

If you manually link the image in the blog post it works, no automated link= ?

From: Johan Pieterse
Sent: 10 October 2011 11:34
To: 'orchard-discuss@lists.outercurve.org'
Subject: RE: Image part of blog entry summary

Is it possible to link the image to the blog entry?
Thanks for the great work! Orchard Rocks!

From: Bertrand Le Roy [mailto:bertrand.le....@microsoft.com]<mailto:[mailto=
:bertrand.le....@microsoft.com]>
Sent: 07 October 2011 20:39
To: orchard-discuss@lists.outercurve.org<mailto:orchard-discuss@lists.outer=
curve.org>
Subject: RE: Image part of blog entry summary

Here is the Parts.Common.Body.Summary.cshtml override that I use on my site=
:
@{
    Orchard.ContentManagement.ContentItem contentItem =3D Model.ContentPart= 
.ContentItem;
    var bodyHtml =3D Model.Html.ToString();
    var more =3D bodyHtml.IndexOf("<!--more-->");
    if (more !=3D -1) {
        bodyHtml =3D bodyHtml.Substring(0, more);
    }
    else {
        var firstP =3D bodyHtml.IndexOf("<p>");
        var firstSlashP =3D bodyHtml.IndexOf("</p>");
        if (firstP >=3D0 && firstSlashP > firstP) {
            bodyHtml =3D bodyHtml.Substring(firstP, firstSlashP + 4 - first= P);
        }
    }
    var body =3D new HtmlString(bodyHtml); } <p>@body</p> 
<p>@Html.ItemDisplayLink(T("Read more...").ToString(), contentItem)</p>

From: Johan Pieterse [mailto:johan...@microsoft.com]<mailto:[mailto:johanpi=
e...@microsoft.com]>
Sent: Friday, October 07, 2011 4:51 AM
To: orchard-discuss@lists.outercurve.org<mailto:orchard-discuss@lists.outer=
curve.org>
Subject: Image part of blog entry summary

Hi *,
Is there a way to include a picture to a listed blog post? Currently my pos= ts 
(by default) only include: the heading, tags, date listed with comments = and 
the first two lines of the content.

--_000_AEF502B15F903A48BB5D1CD8D797BDCA187886E8DB3EX14MBXC303e_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= 
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = 
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"; xmlns=3D"http:= 
//www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" 
content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        line-height:115%;
        font-size:10.0pt;
        font-family:"Tahoma","sans-serif";
        color:#404040;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:#404040;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:36.0pt;
        line-height:115%;
        font-size:10.0pt;
        font-family:"Tahoma","sans-serif";
        color:#404040;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:#404040;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Tahoma","sans-serif";
        color:#404040;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if 
gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" 
data=3D"1" /> </o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-ZA" link=3D"blue" vlink=3D"purple"> <div 
class=3D"WordSection1"> <p class=3D"MsoNormal"><span 
style=3D"font-size:11.0pt;line-height:115%;fon=
t-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If you m= 
anually link the image in the blog post it works, no automated link?<o:p></= 
o:p></span></p> <p class=3D"MsoNormal"><span 
style=3D"font-size:11.0pt;line-height:115%;fon=
t-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nb=
sp;</o:p></span></p>
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = 
0cm 0cm"> <p class=3D"MsoNormal" 
style=3D"margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:normal">
<b><span lang=3D"EN-US" style=3D"color:windowtext">From:</span></b><span la= 
ng=3D"EN-US" style=3D"color:windowtext"> Johan Pieterse <br> <b>Sent:</b> 10 
October 2011 11:34<br> <b>To:</b> 'orchard-discuss@lists.outercurve.org'<br>
<b>Subject:</b> RE: Image part of blog entry summary<o:p></o:p></span></p> 
</div> </div> <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;line-height:115%;fon=
t-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Is it po= 
ssible to link the image to the blog entry?<o:p></o:p></span></p> <p 
class=3D"MsoNormal"><span style=3D"font-size:11.0pt;line-height:115%;fon=
t-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks f= or 
the great work! Orchard Rocks!<o:p></o:p></span></p> <p 
class=3D"MsoNormal"><span style=3D"font-size:11.0pt;line-height:115%;fon=
t-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nb=
sp;</o:p></span></p>
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = 
0cm 0cm"> <p class=3D"MsoNormal" 
style=3D"margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:normal">
<b><span lang=3D"EN-US" style=3D"color:windowtext">From:</span></b><span la= 
ng=3D"EN-US" style=3D"color:windowtext"> Bertrand Le Roy <a 
href=3D"mailto:[mailto:bertrand.le....@microsoft.com]";>[mailto:Bertrand.=
le....@microsoft.com]</a>
<br>
<b>Sent:</b> 07 October 2011 20:39<br>
<b>To:</b> <a href=3D"mailto:orchard-discuss@lists.outercurve.org";>orchard-=
disc...@lists.outercurve.org</a><br>
<b>Subject:</b> RE: Image part of blog entry summary<o:p></o:p></span></p> 
</div> </div> <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1=
F497D">Here is the Parts.Common.Body.Summary.cshtml override that I use on = my 
site:<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" 
style=3D"font-size:11.0pt;line-= height:115%;font-family:&quot;Courier 
New&quot;;color:#1F497D">@{ <o:p></o:p></span></p> <p class=3D"MsoNormal"><span 
lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;Orchard.ContentManagement.ContentItem contentItem =3D Model.Con= 
tentPart.ContentItem;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp; var bodyHtml =3D Model.Html.ToString();<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp; var more =3D bodyHtml.IndexOf(&quot;&lt;!--more--&gt;&quot;);<o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp; if (more !=3D -1) {<o:p></o:p></span></p> <p class=3D"MsoNormal"><span 
lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bodyHtml =3D bodyHtml.Substring(0, more);<o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp; }<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
 &nbsp;else {<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var firstP =3D bodyHtml.IndexOf(&quot;&lt;p&= 
gt;&quot;);<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" 
style=3D"font-size:11.0pt;line-= height:115%;font-family:&quot;Courier 
New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var firstSlashP =3D bodyHtml.IndexOf(&quot;&= 
lt;/p&gt;&quot;);<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (firstP &gt;=3D0 &amp;&amp; firstSlashP &= 
gt; firstP) {<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" 
style=3D"font-size:11.0pt;line-= height:115%;font-family:&quot;Courier 
New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bodyHtml =3D bodyHtm= 
l.Substring(firstP, firstSlashP &#43; 4 - firstP);<o:p></o:p></span></p> <p 
class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p> <p 
class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp; }<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;=
&nbsp; var body =3D new HtmlString(bodyHtml); <o:p></o:p></span></p> <p 
class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">}<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&lt;p&gt;@bo=
dy&lt;/p&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Courier New&quot;;color:#1F497D">&lt;p&gt;@Ht=
ml.ItemDisplayLink(T(&quot;Read more...&quot;).ToString(), contentItem)&lt;= 
/p&gt;<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US" 
style=3D"font-size:11.0pt;line-= 
height:115%;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1=
F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = 
0cm 0cm"> <p class=3D"MsoNormal" 
style=3D"margin-bottom:0cm;margin-bottom:.0001pt;lin=
e-height:normal">
<b><span lang=3D"EN-US" style=3D"color:windowtext">From:</span></b><span la= 
ng=3D"EN-US" style=3D"color:windowtext"> Johan Pieterse <a 
href=3D"mailto:[mailto:johan...@microsoft.com]";>[mailto:johanpie@microso=
ft.com]</a>
<br>
<b>Sent:</b> Friday, October 07, 2011 4:51 AM<br> <b>To:</b> <a 
href=3D"mailto:orchard-discuss@lists.outercurve.org";>orchard-=
disc...@lists.outercurve.org</a><br>
<b>Subject:</b> Image part of blog entry summary<o:p></o:p></span></p> </div> 
</div> <p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal">Hi *,<o:p></o:p></p> <p class=3D"MsoNormal">Is there a 
way to include a picture to a listed blog=  post? Currently my posts (by 
default) only include: the heading, tags, dat= e listed with comments and the 
first two lines of the content.<o:p></o:p></=
p>
</div>
</body>
</html>

--_000_AEF502B15F903A48BB5D1CD8D797BDCA187886E8DB3EX14MBXC303e_--











Reply via email to