Union Datasource, splitting strings and dates
This is an open discussion with 1 reply, filed under XSLT.
Search
If there's a date field in each datasource the Union Datasource should handle the sorting for you (provided your sorting on that field in the first place!). If it doesn't, that's a bug.
I think however you're talking about grouping? If that's the case, in the past I've just done this in PHP. I had a tight deadline and my XSLT knowledge wasn't good enough to figure it out, so this thread is interesting for me too :D
Create an account or sign in to comment.
I'm using Brendo's Union Datasource to merge two datasources together. The resulting datasource is a mix of links that I need to organise by date. Since Brendo's extension doesn't currently support this I need to come up with another solution.
Example DS:
The other dilemma I have is that I need to show a full list of months for all the years available, and turn only the active months into links.
For example, the Union Datasource has the following years and months respectively: 2011 (01,11,12), 2010 (01,02)
I need to output something like this:
2011: Jan, Feb, Mar ... Dec 2010: Jan, Feb, Mar ... Dec
For Jan(01), Nov(11), Dec(12) I would need to apply some XSL and turn them into links
<a href="/2011/01/"> Jan </a>
and so on.
I was thinking of creating a param like so:
Then running a sort of split function over it, running it through date-time.xsl to return months, and then checking that month (somehow) against the DS. If the DS has at least one month that matches the current one, then activate the link.
I know it's all a bit sparse, but any guidance would be greatly appreciated..