{"id":406,"date":"2008-11-09T15:09:00","date_gmt":"2008-11-09T15:09:00","guid":{"rendered":"https:\/\/brainlitter.itgroove.net\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/"},"modified":"2008-11-09T15:09:00","modified_gmt":"2008-11-09T15:09:00","slug":"cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting","status":"publish","type":"post","link":"https:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/","title":{"rendered":"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting)"},"content":{"rendered":"<div class=\"ExternalClass470928760BA3442B98CC9093974E1B1E\">\n<p>So, I have the Community Kit for SharePoint: Enhanced Blog Edition working (CKS:EBE &#8211; if you are reading this now, you are looking at EBE).<\/p>\n<p>\u00a0<\/p>\n<p>However, with the &#8216;default&#8217; Theme included (I actually preferred it over all the others), I noticed the Monthly Archives were not being sorted properly.\u00a0 They should be sorted by Published Date and in my case, as I had to merge in a tonne of legacy\/archive stuff, this would have been a lot of work to correct.\u00a0 The good news is, the XML file simply lacked some ascending sorting and as such, I&#8217;ve addressed it below.<\/p>\n<p>\u00a0<\/p>\n<h2>It looked like this (clearly, months were out of whack)<\/h2>\n<p>\u00a0<\/p>\n<p><a><img loading=\"lazy\" decoding=\"async\" style=\"border-right:0px;border-top:0px;border-left:0px;border-bottom:0px\" height=\"318\" alt=\"clip_image002\" src=\"\/brainlitterarchive\/Media\/WindowsLiveWriter\/CKSEBEEnhancedBlogEditionArchivesSorting_D488\/clip_image002_thumb.jpg\" width=\"117\" border=\"0\"><\/a><\/p>\n<p>\u00a0<\/p>\n<p>In the themes \u2018MonthCount.xsl\u2019, the original code was:<\/p>\n<div style=\"border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4\">\n<div style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none\">\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none\"><span style=\"color:#606060\">   1:<\/span> &lt;xsl:template match=<span style=\"color:#006080\">\"\/\"<\/span>&gt;<\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none\"><span style=\"color:#606060\">   2:<\/span>\u00a0 <\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none\"><span style=\"color:#606060\">   3:<\/span>     &lt;xsl:apply-templates select=<span style=\"color:#006080\">\"rows\/row[generate-id(.) = generate-id(key('months', substring(PublishedDate, 0, 8)))]\"<\/span> \/&gt;<\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none\"><span style=\"color:#606060\">   4:<\/span>\u00a0 <\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none\"><span style=\"color:#606060\">   5:<\/span> <\/pre>\n<\/div>\n<\/div>\n<p>\u00a0<\/p>\n<p>And to correct it, I had to change it to this&#8230;<\/p>\n<div style=\"border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4\">\n<div style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none\">\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none\"><span style=\"color:#606060\">   1:<\/span> <span style=\"color:#006080\">&lt;<\/span>xsl:template match=\"\/\"<span style=\"color:#006080\">&gt;<\/span><\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none\"><span style=\"color:#606060\">   2:<\/span>      <span style=\"color:#006080\">&lt;<\/span>xsl:apply-templates <span style=\"color:#0000ff\">select<\/span>=\"rows\/row[generate-id(.) = generate-id(key('months', substring(PublishedDate, 0, 8)))]\"<span style=\"color:#006080\">&gt;<\/span><\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none\"><span style=\"color:#606060\">   3:<\/span>           <span style=\"color:#006080\">&lt;<\/span>xsl:sort <span style=\"color:#0000ff\">select<\/span>=\"PublishedDate\" order=\"descending\"\/<span style=\"color:#006080\">&gt;<\/span><\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none\"><span style=\"color:#606060\">   4:<\/span>      <span style=\"color:#006080\">&lt;<\/span>\/xsl:apply-templates<span style=\"color:#006080\">&gt;<\/span><\/pre>\n<pre style=\"padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none\"><span style=\"color:#606060\">   5:<\/span> <span style=\"color:#006080\">&lt;<\/span>\/xsl:template<span style=\"color:#006080\">&gt;<\/span><\/pre>\n<\/div>\n<\/div>\n<p>\u00a0<\/p>\n<h2>And now my CKS:EBE Monthly Archives Sort correctly (below)<\/h2>\n<p>\u00a0<\/p>\n<p><a href=\"\/brainlitterarchive\/Media\/WindowsLiveWriter\/CKSEBEEnhancedBlogEditionArchivesSorting_D488\/clip_image002[5].jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right:0px;border-top:0px;border-left:0px;border-bottom:0px\" height=\"364\" alt=\"clip_image002[5]\" src=\"\/brainlitterarchive\/Media\/WindowsLiveWriter\/CKSEBEEnhancedBlogEditionArchivesSorting_D488\/clip_image002[5]_thumb.jpg\" width=\"157\" border=\"0\"><\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>So, I have the Community Kit for SharePoint: Enhanced Blog Edition working (CKS:EBE &#8211; if you are reading this now, you are looking at EBE). \u00a0 However, with the &#8216;default&#8217; Theme included (I actually preferred it over all the others), I noticed the Monthly Archives were not being sorted properly.\u00a0 They should be sorted by &hellip; <a href=\"https:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/\"><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[432,337,14,339],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting) - Brainlitter - Inside the mind of Sean Wallbridge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting) - Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"og:description\" content=\"So, I have the Community Kit for SharePoint: Enhanced Blog Edition working (CKS:EBE &#8211; if you are reading this now, you are looking at EBE). \u00a0 However, with the &#8216;default&#8217; Theme included (I actually preferred it over all the others), I noticed the Monthly Archives were not being sorted properly.\u00a0 They should be sorted by &hellip;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/\" \/>\n<meta property=\"og:site_name\" content=\"Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"article:published_time\" content=\"2008-11-09T15:09:00+00:00\" \/>\n<meta name=\"author\" content=\"Sean Wallbridge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sean Wallbridge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/\",\"url\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/\",\"name\":\"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting) - Brainlitter - Inside the mind of Sean Wallbridge\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\"},\"datePublished\":\"2008-11-09T15:09:00+00:00\",\"dateModified\":\"2008-11-09T15:09:00+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\"},\"breadcrumb\":{\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Brainlitter\",\"item\":\"https:\/\/regroove.ca\/brainlitter\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\",\"url\":\"https:\/\/regroove.ca\/brainlitter\/\",\"name\":\"Brainlitter - Inside the mind of Sean Wallbridge\",\"description\":\"Dad. Husband. Drummer. Learner of Things.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\",\"name\":\"Sean Wallbridge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"caption\":\"Sean Wallbridge\"},\"url\":\"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting) - Brainlitter - Inside the mind of Sean Wallbridge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/","og_locale":"en_US","og_type":"article","og_title":"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting) - Brainlitter - Inside the mind of Sean Wallbridge","og_description":"So, I have the Community Kit for SharePoint: Enhanced Blog Edition working (CKS:EBE &#8211; if you are reading this now, you are looking at EBE). \u00a0 However, with the &#8216;default&#8217; Theme included (I actually preferred it over all the others), I noticed the Monthly Archives were not being sorted properly.\u00a0 They should be sorted by &hellip;","og_url":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/","og_site_name":"Brainlitter - Inside the mind of Sean Wallbridge","article_published_time":"2008-11-09T15:09:00+00:00","author":"Sean Wallbridge","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sean Wallbridge","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/","url":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/","name":"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting) - Brainlitter - Inside the mind of Sean Wallbridge","isPartOf":{"@id":"https:\/\/regroove.ca\/brainlitter\/#website"},"datePublished":"2008-11-09T15:09:00+00:00","dateModified":"2008-11-09T15:09:00+00:00","author":{"@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77"},"breadcrumb":{"@id":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/09\/cks-ebe-enhanced-blog-edition-archives-sorting-monthly-sorting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Brainlitter","item":"https:\/\/regroove.ca\/brainlitter\/"},{"@type":"ListItem","position":2,"name":"CKS EBE (Enhanced Blog Edition) Archives Sorting (Monthly Sorting)"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/brainlitter\/#website","url":"https:\/\/regroove.ca\/brainlitter\/","name":"Brainlitter - Inside the mind of Sean Wallbridge","description":"Dad. Husband. Drummer. Learner of Things.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77","name":"Sean Wallbridge","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","caption":"Sean Wallbridge"},"url":"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/406"}],"collection":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/comments?post=406"}],"version-history":[{"count":0,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/406\/revisions"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/media?parent=406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/categories?post=406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/tags?post=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}