Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Can I edit the Default blog page in SharePoint 2010? Basically I would like to change the sort order of the posts. Currently the default page is sorted by date, is it possible to change it to where it sorts by Category then by Date???? Any pointers will be GREATLY appreciated.

share|improve this question
add comment

2 Answers 2

Yes, you can change the order. The webpart that displays the posts is just a list view webpart. The trick is this -

go to the posts list add a new view, get it sorting the way you want, test. save. go back to your blog homepage edit the page edit the 'posts' webpart's properties select your newly created view in the 'list views' section click OK. Save.

done and dusted.

However, I will say this - a blog is, traditionally speaking, a linear, over-time view of posted news. Your users may not be expecting yours to sort differently, so consider that in your decision - usability is, of course, paramount.

share|improve this answer
    
If you want this to be the default going forward save the site with the modified web part as a template and use it instead of the default blog template. –  ToddersLegrande Jan 31 '12 at 1:38
    
These are great!! I'll give them a try. Thanks stopthatastronaut and tylerrrr07!!!! –  govgirl Jan 31 '12 at 19:31
    
Okay. I tried these suggestions and unfortunately I was successful in getting it to sort by category because it's not a field listed in the sort drop down. You can sort by date, created by, modified by, etc but not by category. I tried to index category and again SharePoint won't let me. I'm really stuck on this one. ANY suggestions would be greatly appreciated!!!! –  govgirl Feb 1 '12 at 18:51
add comment

This is an old post, but I thought I'd respond anyway. I was unable to get the create-a-new-sorted-view-and-select-it-in-the-webpart-editor trick to work. This simply brings up the new view on the page in a vanilla SharePoint style, rather than bringing up the new view in the semi-fancy default blog styling.

What did work is to edit the blog page in Sharepoint Designer, and then change the OrderBy clause to match your chosen column. In your case, I this is the CategoryWithLink field. Search for XsltListViewWebPart, and make sure the description reads "Use the Posts list for posts in this blog", and then scroll down to the XmlDefinition tag. Once there, search for OrderBy, and change the first field to your chosen one. The example below shows how to sort a blog by a custom column called SuggestionRating, rather than by PublishedDate, which is the default. In this example, note that I had to add SuggestionRating to the ViewFields node in order to get this column to appear.

<XmlDefinition>
                <View Name="{39C1F864-1FE1-4A79-9637-586C10D053C6}" Type="HTML" Hidden="TRUE" ReadOnly="TRUE" FreeForm="TRUE" ModerationType="HideUnapproved" DisplayName="" Url="/SuggestionBox/default.aspx" Level="255" BaseViewID="0" ContentTypeID="0x" CssStyleSheet="blog.css">
                    <Query>
                        <Where>
                            <And>
                                <Leq>
                                    <FieldRef Name="PublishedDate"/>
                                    <Value Type="DateTime">
                                        <Today/>
                                    </Value>
                                </Leq>
                                <Eq>
                                    <FieldRef Name="_ModerationStatus"/>
                                    <Value Type="">Approved</Value>
                                </Eq>
                            </And>
                        </Where>
                        <OrderBy>
                            <FieldRef Name="SuggestionRating" Ascending="FALSE"/>
                            <FieldRef Name="ID" Ascending="FALSE"/>
                        </OrderBy>
                    </Query>
                    <ViewFields>
                        <FieldRef Name="Title"/>
                        <FieldRef Name="Body"/>
                        <FieldRef Name="Author"/>
                        <FieldRef Name="PostedByWithDate"/>
                        <FieldRef Name="CategoryWithLink"/>
                        <FieldRef Name="Permalink"/>
                        <FieldRef Name="EmailPostLink"/>
                        <FieldRef Name="NumCommentsWithLink"/>
                        <FieldRef Name="PublishedDate"/>
                        <FieldRef Name="PostCategory"/>
                        <FieldRef Name="SuggestionRating"/>
                    </ViewFields>
                    <RowLimit Paged="TRUE">10</RowLimit>
                    <Toolbar Type="None"/>
                </View>
            </XmlDefinition>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.