I have meeting workspace with several meetings. I add a meeting that was in past and its date is before all other meetings. But on default.aspx page, in the left menu, meetings are sorted by IDs, not by date.
Is there any way how to change this?
This is possible using SharePoint Designer 2010 (I have not tried this using Designer 2007, or on a 2007 SharePoint site).
Done.
Hope this helps!
I found a way how to do this in powershell. You can run this code on the machine where the sharepoint is installed:
$w = get-spweb http://localhost/meetingsWeb
$l = $w.Lists["Meeting Series"]
$v = $l.Views[2] # view for the 'MeetingNavgator' should be third
$q = $v.Query
$v.Query = $q + '<OrderBy><FieldRef Name="EventDate" Ascending="TRUE" /></OrderBy>'
$v.Update()
Note, that the code is prone to error. For example, you shouldn't run it twice, because the OrderBy
clause is added in each run, so the query would be wrong then.
Something like this can be easily converted to C# and used in some web event receiver (WebProvisioned).