Customizing the blog post web part to not show entire entries

I have a blog site, and as you know, the posts web part shows the entire contents of each listed post, rather than one paragraph, followed by a "click here to read more" link.  I know that there is no out-of-box functionality for this, because of course,
why would there be? Who needs nice looking blogs?  Anyway, I found this on the internet:
http://zabistop.blogspot.com/2009/02/customizing-sharepoint-blog-posts-web.html
It knows what's up, but it's outdated and the code doesn't mesh with what I have. Are there any articles similar to this online? I can't be the first person who thought of this, and doing it from the ground up is not an option. I appreciate any help.

In 2010 you can make the same changes using a similar method.
Open the default.aspx page, in code view click in within the blog area. In the ribbon click on the List View tools >design. Click on Customize XSLT in the Actions panel. When you do that you will be able to see all the code.
Find this line of code <xsl:template name="FieldRef_Note_body.Body" ddwrt:dvt_mode="body" match="FieldRef[@Name='Body']" mode="Note_body" ddwrt:ghost="hide">
Approx line 402. It actually looks like   </xsl:template><xsl:template name="FieldRef.... so you will have to place your cursor after the template close and hit enter a few times to make space for the code.
Directly above that line, where you have added spaces, include this code. (I cheated and grabbed this code from another site where we did the same thing - and was able to modify it slightly to work for the blog.)
<!-- used to strip out HTML from passed-in field -->
    <xsl:template name="removeHtmlTagsFromField">
     <xsl:param name="html"/>
     <xsl:choose>
         <xsl:when test="contains($html, '&lt;')">
             <xsl:value-of select="substring-before($html, '&lt;')"/>
             <!-- Recurse through HTML removing all markup -->
             <xsl:call-template name="removeHtmlTagsFromField">
                 <xsl:with-param name="html" select="substring-after($html, '&gt;')"/>
             </xsl:call-template>
         </xsl:when>
         <xsl:otherwise>
             <xsl:value-of select="$html"/>
         </xsl:otherwise>
     </xsl:choose>
 </xsl:template> 
Next below the line ( should be the next line below the pasted code)   <xsl:template name="FieldRef_Note_body.Body" ddwrt:dvt_mode="body" match="FieldRef[@Name='Body']" mode="Note_body" ddwrt:ghost="hide">
Locate the       <xsl:param name="thisNode" select="."/> and paste the following code:
  <!-- call "removeHtmlTagsFromField" template to strip out html markup from the field -->   
 <xsl:variable name="textOnlyDescription">
     <xsl:call-template name="removeHtmlTagsFromField">
         <xsl:with-param name="html" select="$thisNode/@*[name()=current()/@Name]" />
     </xsl:call-template>
 </xsl:variable>
I have already swichted out the select content with the content that was in the xsl line that renders the body content.
Locate the code  ( should be 2 lines down)     <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes"/>
Comment the code out and replace with the following code:
      <xsl:value-of select="substring($textOnlyDescription, 0, 320)" disable-output-escaping="yes"/>
      <xsl:if test="string-length($textOnlyDescription)>320">...</xsl:if>
Change the number to your desired length.
Save your file.
You can revert the file if you ever need to, after its checked in, by right clicking on the page and selecting reset to site definition. 
Hope this helps. I plan on doing a post shortly covering this and will have screen shots.
Heather Waterman SharePoint Desginer www.heatherwaterman.com

Similar Messages

  • What's New Web Part will not show updates from Team Discussion Web Part

    I have a Team Discussion Web Part which I want to show in the "What's New" updates Web Part. I have indexed the "modified" column of the team discussion and added it as a target list for the What's new Web Part, however updates to the Team
    Discussion are not showing up in the What's New Web Part.
    If I happen to tell the What's New web part to "use the below person column as a filter" and choose "Modified By", the page will crash with an error stating that the What's New web part caused the failure.
    Any suggestions?

    Hi KinsDotNet,
    According to your description, I could reproduce this issue.
    The following alternative solution consists in using the " Team Discussion " web part (with a customized view) in place of the " What's New " web part.
    Alternative solution steps:
    1. Create an index on the “ Modified ” field of the “ Team Discussion ” library in the Site Collection page in which “ What’s New ” web part’s functionality is needed
    2. Insert a “ Team Discussion ” web part in the same page and position where the “ What’s New ” web part was intended to be situated, or wherever it is needed
    3. Click on the “ Save & Close ” icon to save the page with the new “ Team Discussion ” web part
    4. Click on the “ Edit Web Part ” option in the  “ Team Discussion ” web part’s context-menu and click on the “ Edit the current view ” link inside the “ List Views ” section of the web part’s settings box
    5. Choose the desired display columns in the “ Columns ” section
    6. Set the “ Sort ” and “ Filter ” sections settings according to the following screenshot:
    7. In Step 6 , likely two identical “ Modified By ” options will be seen inside the “ Filter ” section’s “ when column ” drop-down.
     Selecting the second of these two “ Modified By ” options will likely cause the “ Team Discussion ” web part to not  work properly, so please make sure to select the first “ Modified By ” option. If, in the unlikely case, after  selecting the
    first “ Modified By ” option the “ Team Discussion ” web part does not render properly, go back and  select the second “ Modified By ” option and the web part should render properly
    8. In the “ Item Limit ” section, set the “ Number of items to display ” to the maximal amount of items you would like to be displayed inside the web part (for example:  5 )
    9. Click the "OK" to save the settings
    A similar post for your reference:
    http://social.technet.microsoft.com/Forums/en-US/dbdc67ed-1453-4045-b2a7-b6ab83b23c8c/include-discussion-board-on-a-whats-new-web-part?forum=sharepointgeneralprevious
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Using term set as refiner in content search web part does not show all used terms

    When you create a terms set (12 terms with +/- 10-20 child terms) , attach it to a site column and allow multiple values to be selected the search service does not find all used values in the REFINERS tab of the content search web part.
    Example:
    Field ‘Tags’ is the term set which can be refined. We want to do this in the REFINERS tab of the content search web part.
    Tags is containing following fields:
    •Course document
    •Poster
    •ALS
    •Before
    •During
    •CPR/AED I
    In all libraries we used +/- 15 different tags already.
    Example of a tag field in the library:   "Poster;ALS;Belgium"
    The problem is we can’t see all of the used tags in the refiners tab when you open it for the first time.  (You can see Belgium or Cyprus is not in the list of tags.)
    When you select one tag and add it as a refiner, the others eventually do show up. But never all of them together.   It’s like he is only showing the most used (and maybe first selected?) tags first. I also think he might be having some trouble
    with multi value selections in the tag field.
     Does anyone else have the same issue as we do? And is there a solution already?

    Hi Sasha,
    According to your description, my understanding is that all the used terms cannot display in the Refiners in Content Search web part.
    If the results display in the Search Result Preview, then the terms used in these results can be displayed in the Refiners tab.
    I tested the same scenario per your post, and when I first opened it I can view all the terms which were used in the search results listed under owsmetadatafacetinfo.
    I recommend to do a full crawl and then you can view all the terms used in the search results are displayed under owsmetadatafacetinfo.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • The icons and boxes around the icons of web pages are not showing

    Imagine when looking at the Mozilla "enter your username and password page" all you see is text but no boxes around the fields. Well...that is what I see. I see "Enter your username" but next to it is no boxes around the field to enter the username. I have to click around to see where I can type in the box.
    Other pages like the Office 360 email page used to show little curved arrow buttons like "reply" and "reply all" and "Delete" with a red X but now just greyish looking pages. I tried resetting FF to default.

    hello, the behaviour you have described might be the case when you have enabled a high contrast theme in your windows control panel - please switch to another theme...

  • Content query web part is not working after chaning the DNS entry

    Hi all,
    We have a content query web part in the sharepoint site but it is not working after changing the DNS Entry for the web site ipaddress from one server to other . But it is working fine on the server, if we try to access the site from other system content
    quey server its not working fine and its giving error message as bellow.
    Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
    Can anyone help me to fix this issue please.

    I have custom XSLT . But it is working fine before changing the dns entry as soon as we change the DNS entry the content quey web part is not working. I tried to delete the content query web part and add it once again to the page, As soon as content query
    web part is added to the page the fallowing error message is displayed.
    Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
    Can anyone help me to fix this issue please.

  • Blog Notifictions web part

    Within my SharePoint 2013 site, I have a blog subsite, within my main site I see a Blog Notifications web part that I can add to my home page. The description for that web part is {Provides quick links to register for blog posts notifications using Alerts
    or RSS feed}, I created an RSS feed from my blog site, however, how can I show it within the Blog Notification web part? When I go to edit web part there is nothing there to configure it to read something.
    I know how to read the blogs from an CQWP, however, I was hoping to use the blog notifications web part.
    can I even use it or is a useless web part?

    Hi,
    According to your description, my understanding is that you want to how to use Blog Notification web part in SharePoint 2013.
    Per my knowledge, the Blog Notification web part should be used in blog site and it can provide quick links to see the RSS Feed and create alerts for the blog posts.
    After adding the Blog Notifications web part in blog site, it will display RSS Feed and Alert Me quick links in the page, please refer to the picture below:
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • The icons of the blog posts that I visit do not change to show my visit. eg. I used to be able to see the orange blogger symbol when I visited that blog post.

    I subscribe to blogs via RSS (whatever that means) and new blog posts show up in my bookmark menu ....... they show up with a grey unassuming icon at the beginning of the blog post bookmark.
    Months ago the appearance of the bookmarks would "change" when I visited the post ..... eg. for blogger posts the icon would turn into the traditional orange blogger symbol.
    But for many many months now the icons don't change with the visit and it's getting difficult to remember if I've visited that blog post or not by looking at the bookmark itself.
    How can I get the bookmark to update/refresh when I visit a blog post?

    I see a faded RSS feed icon for live bookmark items that turn into the website's favicon after having visited the link.
    There may be a problem with the favicons if you get the generic default icon instead of the website's favicon.
    You can try to repair the places database with this extension:
    *https://addons.mozilla.org/firefox/addon/places-maintenance/
    See also:
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    You can to remove all stored data from that domain via "Forget About This Site" in the right-click context menu of an history entry (Show All History or History sidebar) to see if that will reset the favicon if the above posted steps didn't help.
    Using "Forget About This Site" will remove everything from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious if you need to keep passwords or other data from that site.<br />
    You can't recover from that "forget" unless you have a backup of the affected files.<br />
    *https://support.mozilla.org/kb/Backing+up+your+information
    *https://support.mozilla.org/kb/Recovering+important+data+from+an+old+profile
    It doesn't have any lasting effect, so if you revisit such a 'forgotten' website then data from that website will be saved once again.

  • Web Part is not visible in Web Part gallary

    Hi,
    I have developed a project in sharepoint having two web parts inside it.
    Initially, when there was only one web part in my project it was working fine. But suddenly when i added a new web part, it is not showing me web parts in a gallary. Event it is not available in web part list under Web Designer Gallaries.
    I tried with old .wsp to deployed, but still the same problem.
    On my development machine it is working with two web parts very good. but when i try to deploy that wsp on production site, it is not showing me anything in web part gallary while it was when i was working with one web part only in my project.
    Please, direct me where i am doing wrong, any possibilities?
    I did workarounds as
    1.  Check for the custom webpart feature folder under 14\TEMPLATE\FEATURES ----- Yes it exists there
    2. If the feature Scope is Site
    3. The webpart dll is deployed to GAC with Stsadm command
    4. No web part(My Custom) found here Site Action > Site Settings > Galleries > Web Parts

    in my development environment i checked in site collection feature, it isn't available in site collection feature but still i am getting those web parts in web part gallery while adding it on page.
    Also, in Production environment, feature is available in /templates/features folder after deployment, but not available in web part gallery while adding it on page.
    I tried with uploading .webpart file which is available in /templates/features production environment as i mentioned, is running for one web part. Not for second web part and giving me security error.
    As, uploading .webpart file is not feasible solution, please tell me how could i do that with .wsp file?
    please tell me what could be another workaround. 
     

  • How to change the blog posts view when navigating through categories?

    Hello, currently I've been struggling for a while with the following problem:
    In my SharePoint blog site I have the following default view of posts:
    http://s16.postimg.org/yvmu0j51x/Default_site.jpg
    When I click on a category, I get the following view of posts:
    http://s29.postimg.org/58lm8p993/Category_site.jpg
    Is there any possibility to get the same way of showing post as how it looks on the default site? So with Image, with body etc. But then only filtered based on category.
    Any help would be highly appreciated!
    Regards,
    Danny

    Hi Danny,
    No, my result is like:
    You can do as the followings:
    Edit the page
    Insert the Categories list into the page
    Insert the Posts list into the page
    Edit the Posts web part, and switch the current view to Summary view, click OK
    Click Connections->Get Filter Values from->Categories, like the screenshot below:
    Provide Field Name:Title, Consumer Field Name: Category
    Click Finish
    Then you can filter posts based on a category by clicking Select in the first screenshot.
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Content Query Web Part filter not returning any results

    This CQWP stopped working after moving a number of files to new locations. It is configured in the following way:
    Source: Show items from the following site and all subsites
    List type: Pages Library
    We want to filter the list by the article date, last 30 days. Without a filter, results are returned. If ANY filtering is applied, NO results are returned, NO error messages.
    I experimented with "Group items by" filter, but it also resulted in no results.
    If I change the Source field to a subfolder, I can return filtered results.
    Any ideas? 

    Make sure that ItemStyle.xslt is working fine, try to change the item style
    for your content query web part, if it shows data then there your custom defined
    item style is not working properly

  • Render html in the Business Data web part (used for the BCS profile page)

    I am searching and indexing a webservice and pulling in external content, through SharePoint's BCS. I have used SharePoint Designer to make the connection and its a read only connection, we are not trying to write back to the external data source. The problem
    I have is that some of the columns are rendering the HTML as a string, with all of the HTML tags. For example, a column will render like this:
    &lt;p&gt; Onboarding, Recruiting &amp;amp; Talent Acquisition general information&lt;/p&gt;
    The profile page uses the business data web part and will accept custom XSL and I have modified the column that is rendering the html from:
    <xsl:value-of select="@u_cause" /> 
    to
    <xsl:value-of disable-output-escaping="yes" select="@u_cause" /> 
    The problem is that it does not make a difference the column will still render the HTML. Is there any other way to make the column render HTML?
    Joe Garcia

    Hi,
    According to your description, my understanding is that you want to render column value as the HTML format in the xslt list view.
    I suggest you can set the “disable-output-escaping” attribute like below, it will render as html:
    <xsl:value-of select="@MyColumn" disable-output-escaping="yes"/>
    Here are some detailed articles for your reference:
    http://sharepoint.stackexchange.com/questions/16089/unescape-html-from-list-column
    http://doitwithsharepoint.blogspot.com/2011/06/sharepoint-list-forms-display-html.html
    Thanks
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jerry Guo
    TechNet Community Support

  • Reporting Services Webpart - web part does not auto render consistantly

    We are on SharePoint 2010 (integrated with Reporting Services)- on several sites we have added the Reporting Services Web Part and with a saved parameter.  The behavior of this web part is not consistent.  There are times when I open up a site
    and the web part will auto render the report.  5 minutes later I can go into the same site, and the web part does not auto render the report.  I have to do edit page, or close and re-open the web site.  Has anyone experienced this type of behavior. 
    I've looked for assistance with this issue on-line cannot find anything that specifically addresses this issue.   

    Hi Karen,
    If the parameters have default values in the report, then the report can be rendered automatically.
    For this issue, I recommend to verify the things below:
    Does this issue occur when you open the page with the web part in a new tab in the browser or go back to the previous opened tab?
    Does this issue occur in the server side or client side?
    Please add the site to trusted sites in Internet Explorer to see how it works.
    Please change another browser to see how it works.
    For narrowing down the issue scope, please test with another report and compare the results.
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Using "View Selector" in the List View Web Part, changes the web part page to the view selected's page.

    Hi,
    I am relatively new to Web Parts pages.  I created a page with list view web part and a Infopath Form Web Part, which are connect via the "Get Form From" option.  My users would like to be able to use views dependent on what
    they are looking for.  So I created different views.  However, when I select the view from within the Web Part, it changes the web part page to the list view page.  I must be doing something wrong.  How do I configure the list view to show
    the selected view and results within the existing "list view web part"?
    Thanks,
    Dwayne

    Hi
    Lindali,
    Sorry, but this has not been answered to my liking.  The "List View Web Part" has the ability for the user to select the view from within the web part, so there you should be able to select a different view and have it appear within the same web part. 
    Does anyone know how to complete this task?
    Thanks,
    Dwayen

  • Everything works except viewing a report *in* the Report Viewer web part

    Hello!
    I'm having an issue with the SharePoint 2007 PIK where the following works fine...
    1. Adding the Document List to the web page and clicking a report to view it in a new browser window
    2. Adding a Document View web part and pointing it to a Document on the BOE server repository views fine in the Doc View web part
    However, when I try to use the Crystal Report View web part, click Edit, and Browse to select a report to view, it selects it fine but does not display it. Instead I get this error:
    Report cannot be displayed because no report processing server is available. Please try again later or contact your BusinessObjects Enterprise administrator.
    It setting up a connection between the Document List and Crystal Report View also gives the same error when a report is selected by the end user.
    Any ideas what I can check? Do I have to install the BOEXIR2 web components on this SharePoint server too?
    Right now it just has the BOE .NET SDK and SharePoint PIK. The full BOE XI R2 server that I'm calling is on another computer.
    Thanks!
    Horus

    Ok, got this to work finally. The virtual directory steps were helpful but I still got broken links on my images.
    I tried right clicking the toolbar and report images in the browser and found the URL. Then I just entered that URL in the browser. This helped a bunch since at least I had a new error to research.
    Server Error in '/crystalreportviewers115' Application.
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    Parser Error Message: Cannot use 'partitionResolver' unless the mode is 'StateServer' or 'SQLServer'.
    Googling this lead me to a tip to add a sessionState key in my X:\Program Files\Business Objects\common\3.5\crystalreportviewers115\web.config file as follows:
    <sessionState mode="SQLServer" timeout="60" allowCustomSqlDatabase="true" partitionResolverType="Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
    After this my buttons and images worked. I'm not sure if your config is different but as a beginner with this stuff myself hopefully this works for you.
    Horus

  • Applying a User Filter web part to the Project Summary Web Part

    I've been searching for a way to do this but to no avail!
    Is there a way to filter out the Project Summary Web Part to only display MyItems.aspx?
    nothing seems to work.  I have designer 2013, SharePoint 2013, etc.
    Please advise,

    Hi Boxboy,
    Based on your description, my understanding is that you want to only display current user’s tasks in the Project Summary web part. Is it right?
    Project summary web part displays events and tasks in SharePoint 2013. Per my knowledge, we cannot filter the tasks in the OOB Project summary web part.
    More information about Project summary web part:
    http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2013/07/11/how-to-use-the-project-summary-web-part-in-sharepoint-2013.aspx
    As a workaround, you can filter the orginal tasks list using Current User Filter web part instead of filtering the Project summary web part.
    Or, you can develop your own Project summary web part using code.
    How to create a web part for SharePoint:
    https://msdn.microsoft.com/en-us/library/ee231546.aspx
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

Maybe you are looking for

  • External hard drive stops working with AP Extreme after Time machine touches it

    *sigh* Ok. I had a 1.5TB external HD connected to my Airport Extreme (henceforth to be known as APE) working fine, albeit with unexpected slow transfer speeds....not the point. Moving along. Updated to 7.6.1 firmware. Ugh. I wish apple would have the

  • Subscribed calendars are not appearing in iCloud.

    I subscribe to my wife's calendar and it appears fine in iCal on my iPhone 3gs and iPad2, both running ios5, as well as my MacBook. It does not show up in iCloud calendar. Is this really not supported?

  • Display  Pop up message when  changing and displaying sales orders?

    Hi Friends, My client requirement is to display text popup during change sales order VA02 , and  Display sales order VA03. Pls find me a answer for this , Thanks. Nina.T

  • Inserting/Updating data pertaining to future or past

    I am considering to use OWM to implement several lookup tables that need to keep track of data versions over time. One of the requirements of the application is the capability to insert or update data at any point in time, but this data should only (

  • Help with MPEG files

    Hi everyone - I have a client who's sending me MPEG files to edit which have a very strange configuration. First, QT or FCP cannot read them (saying there is no valid movie content on it). When I open it on VLC, it plays well, but all 4 audio tracks