Search

How do I grab the author of the current article in XSL? In other words, I want to display the author’s name along with the date the article was published.

Well the quick fix would be to create it as a field in the section and manage it manually via a select box, but otherwise I think it would require an extension field to pull that out of the DB. Offhand, I’m not even sure the author gets recorded with an entry creation.

Symphony comes with an “Author” field that you can add to a section. This creates a dropdown of all authors in the backend, and can be set to pre-select the current author. If you include this in your Data Source XML output you should get information about that author.

Symphony doesn’t do this automatically because it doesn’t assume that you’re always using an Articles/Authors strcuture.

Thanks for the responses.

Symphony doesn’t do this automatically because it doesn’t assume that you’re always using an Articles/Authors strcuture.

Yes, I guess I’m guilty of treating Symphony as if it were Wordpress or something. ;)

Cheers.

Yes, I guess I’m guilty of treating Symphony as if it were Wordpress or something. ;)

This is exactly why I love Symphony so much - it really makes no assumptions about the data you wish to store, and doesn’t force you to use some outdated, overbearing scheme based upon blog posts (not that I’m mentioning any terrible CMS products by the name of ExpressionEngine out loud, mind you).

Whoops.

I did.

It does assume that you want to use first and last names for authors though which I found a bit odd.

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