Search

I need to output the latest 3 entries (ordered by date descending) from both Events and News sections.

See the XML on xpathr.

The output should be 3 entries, ordered by date descending:

Evenimentul #2 (2012-04-25T17:20:00+03:00)
N #5 (2012-04-25T14:13:39+03:00)
Evenimentul #1 (2012-04-24T17:20:00+03:00)

I think key() should be used but I don't really know how to use it.

Thanks for any help.

Hmm, got it. Do you have a better solution?

That's what I would have come up with too.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details