6 users online. Create an account or sign in to join them.Users
Data source: newest entries
This is an open discussion with 2 replies, filed under General.
Search
Yes, the most efficient would be to get the latest seven is descending order (ordering by System Date, limit to 7 entries) from the database and then re-sort in your presentation layer. The re-sort should be as easy as:
<xsl:for-each select="entry">
<xsl:sort select="position()" data-type="number" order="descending"/>
...
</xsl:for-each>
Fantastic, thanks Nick (as always)!
Create an account or sign in to comment.
Hi all, it’s Monday and my brain has not kicked on yet!
I’m trying to get a data source to output the newest 7 entries in a section and then sort them in ascending date order. I was able to get an approximation by using “later than last week” as a filter, but this is too time-specific (it depends on there being 7 entries within the past week, and this may not be the case.)
I considered using descending sort on the data source and then re-sorting in XSLT. Any other clever approaches? Maybe pagination?