質問する質問する
 

回答済みsharepoint blog summary web part

  • 2009年11月12日 15:23jmillman ユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     
    someone wants to put a webpart on the front page of our site that will show a title and brief description of the last 2 or 3 blog posts.  The blog exists on a subsite.

    Is there something built in that I could use for this?

    I should have been more specific.  I can get the Content Query Web Part to work, but that will only show the title.  Is there a way to get some of the post as well?

回答

  • 2009年11月20日 5:27Ganesh Jat ユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     回答済み
     you can also show other fields in CQWP. For this you need to modify .webpart file and some xsl files in style library -

    - Export webpart and save it to local drive (.webpart file)
    - Open .WebPart file and add  the columns in CommonViewFields.
    <property name="CommonViewFields" type="string">Title;Post;</property>

    - Save .webpart file 
    - Open Your page and import and add this .webpart file

    -Open ContentQueryMain.xsl file ((/Style%20Library/XSL%20Style%20Sheets/) and add a new xsl template
    <xsl:template name="OuterTemplate.CallItemTemplate"> <xsl:choose>
    <xsl:when test="@Style='MyBlog'">
    <xsl:apply-templates select="." mode="itemstyle">
    <xsl:with-param ... /> </xsl:apply-templates>
    </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose>
    </xsl:template>

    - Open ItemStyle.xsl file(/Style%20Library/XSL%20Style%20Sheets/ItemStyle.xsl) , Add your template code (Copy any standard itemstyle template and rename it to your template ('MyBlog'))
    <xsl:template name="MyBlog" match="Row[@Style='MyBlog']" mode="itemstyle">

    -Add your xsl code for displaying "Title;Post, etc" columns .

    -save and publish both the file

    - select Item style = MyBlog for your CQWP

    Thanks
    Ganesh Jat
    Diaspark Inc. | My Blog | LinkedIn | Twitter

すべての返信

  • 2009年11月19日 7:14Lambert QinMSFT, モデレータユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     

    Hi,

     

    Yes, Content Query web part could only show the title.

    If SharePoint Designer is an option, you could try to use Data View web part to gather and display the latest Blogs from the subsites.

    If you are not familiar with Data View web parts, please see Data Views (http://office.microsoft.com/en-us/sharepointdesigner/CH100667641033.aspx) for more information

     

    -lambert


    Sincerely,
    Lambert Qin
    Posting is provided "AS IS" with no warranties, and confers no rights.
  • 2009年11月20日 5:27Ganesh Jat ユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     回答済み
     you can also show other fields in CQWP. For this you need to modify .webpart file and some xsl files in style library -

    - Export webpart and save it to local drive (.webpart file)
    - Open .WebPart file and add  the columns in CommonViewFields.
    <property name="CommonViewFields" type="string">Title;Post;</property>

    - Save .webpart file 
    - Open Your page and import and add this .webpart file

    -Open ContentQueryMain.xsl file ((/Style%20Library/XSL%20Style%20Sheets/) and add a new xsl template
    <xsl:template name="OuterTemplate.CallItemTemplate"> <xsl:choose>
    <xsl:when test="@Style='MyBlog'">
    <xsl:apply-templates select="." mode="itemstyle">
    <xsl:with-param ... /> </xsl:apply-templates>
    </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose>
    </xsl:template>

    - Open ItemStyle.xsl file(/Style%20Library/XSL%20Style%20Sheets/ItemStyle.xsl) , Add your template code (Copy any standard itemstyle template and rename it to your template ('MyBlog'))
    <xsl:template name="MyBlog" match="Row[@Style='MyBlog']" mode="itemstyle">

    -Add your xsl code for displaying "Title;Post, etc" columns .

    -save and publish both the file

    - select Item style = MyBlog for your CQWP

    Thanks
    Ganesh Jat
    Diaspark Inc. | My Blog | LinkedIn | Twitter