Blog Post List - excerpt of 0?

I'm using the Blog-Post List widget and I'd like to configure it so that there is NO excerpt. I try to set the Excerpt field as "0", and it just defaults back to "1". Is there no way to display a blog's title ONLY without an excerpt at all? 


    I had a similar situation, but I only wanted to display the blog image and excluding any text. We made the images call-to-action buttons and used custom images that included the text, you can see an example here:

    To do so, in Widget Studio, I copied the out-of-the-box Blog-Post List widget and created one I called "Blog - Post List - Image only." Then, I removed the code that displays the text from "listitem.vm". (Pretty sure that's the only change I made, I don't see any others at quick glance.) 

    I don't see any reason the same couldn't be done to keep the title but not the excerpt and just use that new widget when you need it. 

    Here's how that file reads on my custom/edited version:

    ## Renders an individual blog post
    ## Expects in context: $post
    #set ($blog = $core_v2_blog.Get("%{ Id = $post.BlogId }"))
    #if ($blog && $blog.Id > 0)
    	#set ($postImage = '')
    	#if ($post.PostImageUrl && $post.PostImageUrl != '')
    		#set ($postImage = $post.PostImageUrl)
    	#elseif ($blog.DefaultPostImageUrl)
    		#set ($postImage = $blog.DefaultPostImageUrl)
    	#set ($showthumbnail = false)
    	#if ($displayPostImage && $postImage && $postImage != '')
    		#set ($showthumbnail = true)
    <li class="content-item ${viewLayout}" data-href="$core_v2_encoding.HtmlAttributeEncode($post.Url)">
    	<div class="content ${viewLayout} abbreviated">
    		#if ($showthumbnail)
    			<div class="avatar">
    				#if ($viewLayout == 'grid')
    					#set ($imageWidth = 512)
    					#set ($imageHeight = 256)
    					#set ($imageWidth = 100)
    					#set ($imageHeight = 100)
    				<a href="$core_v2_encoding.HtmlAttributeEncode($post.Url)">
    					$core_v2_ui.GetResizedImageHtml($postImage, $imageWidth, $imageHeight, "%{border='0px', alt=$post.Name, ResizeMethod = 'ZoomAndCrop' }")
    		##<div class="summary">
    		##	<h2 class="name">
    		##		#if($blog && !$oneBlog)
    		##			<a class="internal-link view-application" href="$core_v2_encoding.HtmlAttributeEncode($blog.Url)">
    		##				$blog.Name:
    		##			</a>
    		##		#end
    		##		<a href="$core_v2_encoding.HtmlAttributeEncode($post.Url)">$post.Title</a>
    		##	</h2>
    		<div class="attributes">
    			<ul class="attribute-list">
    				<li class="attribute-item">
    					<span class="attribute-value">$core_v2_language.FormatDate($post.PublishedDate)</span>

    Use at your own risk and make a backup, but it works well for us! 

  •  , this is SO HELPFUL! I love what you've done with images only. Wow, what a difference to have that pesky text gone. I think I'm going to copy your image only idea (unless you charge royalties... :-) ). I will test this out next week. HUGE thanks!

  • Nice, glad it helps, and good luck with it! The only downside is you can't Command-F on the page to find anything, but obviously, the search helps with that if you're looking for anything specific. We chose looks over functionality in this case Smile

  • Frankly, I like 's suggestion better than this, but just note: the reason it's setting the excerpt back from 0 to 1 is that the widget is currently defining its excerptSize field to only allow a min of "1". You can see this in Widget Studio > Blog - Post List > Configuration. So, it's also possible to edit the configuration to tell it to allow values of 0. However I think the end result will still look worse than an image-only approach.