locked
How to show more 'lines' of announcements?

    Question

  • Hi,

    on my Sharepoint Site i am using an Announcement-List. On the Homepage of my Site i placed this List and i am showing the latest Announcement.

    The Problem is, that only the first 3-4 Lines of the Announcement are shown. But i want to show the complete Announcement, or some some lines.

    Is this possible? And if yes, how could i solve this.


    Best regards,
    Yavuz B.

    My Sharepoint and Enterprise 2.0 Blog http://www.starcoder.net
    Microsoft Sharepoint Resources & Blogs List
    Thursday, October 21, 2010 1:56 PM

Answers

  • Then you open your homepage.aspx file into SPD. Right click on the Announcement WebPart and click on "Convert to XSLT DataView". then by using xslt you can adjust number of words you want to show. code some thing like this. 

     

    <xsl:value-of select="substring($bodyContent,1,100)" disable-output-escaping="yes"/>
    or 
    <xsl:value-of select="substring(@body,1,100)" disable-output-escaping="yes"/>

    Where 1 is starting point and then count 100 words.

    Let me know if you got any problem.

     


    asim MCTS SharePoint 2007 -WSS 3.0
    • Marked as answer by [Yavuz B.] Friday, October 22, 2010 10:37 AM
    Friday, October 22, 2010 9:08 AM

All replies

  • Hi,

    If you use CQWP to show your Announcements List, then there is a CQWP web part property " Groping and Sorting > Item limit  " from there you can limit your items what you want. 

    how to customize the CQWP. check this link. 

    http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx


    asim MCTS SharePoint 2007 -WSS 3.0
    Thursday, October 21, 2010 2:28 PM
  • If you don't mind making it look a bit uglier simply changing the view of the web part to show all items and then adding the body column should work.

     

    It is what we suggest people do in our office because it is such an easy solution and it doesn't really bug anyone enough to make us create a content query or some other better looking solution.

    Thursday, October 21, 2010 3:04 PM
  • You can do it  another Another way by tweak HomePage.aspx file into SharePoint Designer. Its very simple. Follow steps.

     

    • Open required page in your case its HomePage into SPD.
    • Find the Announcement List WebPart.
    • On the Top Left corner of WebPart there is a small white box called "List View Options" click on it.
    • From dropdown select "Change Layout......"
    • From Tabs Select "Paging" Tab.
    • Put your required number of items which you want to show into the " Limit the total no. of item display to " field.
    • Press OK, save the file, and refresh the page.  

    Let me know if you get problem .

     


    asim MCTS SharePoint 2007 -WSS 3.0
    Thursday, October 21, 2010 9:14 PM
  • To all:

    I think my problem is a little different from the solution you gave me:

    I dont want to show n-Announcement, i want to show more lines of the Body/Message of the Announcement.


    Best regards,
    Yavuz B.

    My Sharepoint and Enterprise 2.0 Blog http://www.starcoder.net
    Microsoft Sharepoint Resources & Blogs List
    Friday, October 22, 2010 8:18 AM
  • Then you open your homepage.aspx file into SPD. Right click on the Announcement WebPart and click on "Convert to XSLT DataView". then by using xslt you can adjust number of words you want to show. code some thing like this. 

     

    <xsl:value-of select="substring($bodyContent,1,100)" disable-output-escaping="yes"/>
    or 
    <xsl:value-of select="substring(@body,1,100)" disable-output-escaping="yes"/>

    Where 1 is starting point and then count 100 words.

    Let me know if you got any problem.

     


    asim MCTS SharePoint 2007 -WSS 3.0
    • Marked as answer by [Yavuz B.] Friday, October 22, 2010 10:37 AM
    Friday, October 22, 2010 9:08 AM
  • Wow, that's it. Thank you!
    Best regards,
    Yavuz B.

    My Sharepoint and Enterprise 2.0 Blog http://www.starcoder.net
    Microsoft Sharepoint Resources & Blogs List
    Friday, October 22, 2010 10:38 AM
  • Where do you put this code at?
    Tuesday, February 22, 2011 6:33 PM