How do I find the original Author name for a content node? Options
readingdancer
Posted: Friday, December 14, 2007 12:31:42 PM

Rank: Enthusiast

Joined: 9/27/2007
Posts: 24
Location: Reading, UK
Hi,

I am not sure if this is an XSLT question or really a "template" GETITEM question..

I am trying to get the original author of a document that is created on our site, because we will have different people creating FAQ's, the FAQ's all go through a moderator (me) and then the writerName becomes ME! Obviously I'd ideally like to credit the original author not the moderator.

So I'm looking for a createdByName.. or something like that, it's obviously stored as it's shown on the properties tab as "Created by"

You can see the FAQ's I am talking about here, if you drill down you'll see the credit at the bottom of the FAQ's..

http://www.ava.co.uk/support/faq.aspx

Thanks for your help!

Chris
http://www.ava.co.uk/

Chris Houston - Business Dev Director for Ava / CTO for Clik Media Group / Umbraco Developer
tim
Posted: Friday, December 14, 2007 12:37:18 PM

Rank: Addict

Joined: 2/19/2007
Posts: 738
Location: Belgium
I don't think umbraco stores the 'createdByName'. But an easy way to make this possible is to add a new property ( createdByName ). Then create an actionhandler wich will fill in the createdbyname when you add a new document. If you want some code, i'll digg it up.

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
readingdancer
Posted: Friday, December 14, 2007 1:00:39 PM

Rank: Enthusiast

Joined: 9/27/2007
Posts: 24
Location: Reading, UK
Hi Tim,

Thanks for the quick reply!

I think Umbraco must store it somewhere, as I mentioned if you look on the property tab, the "Created by" always remains constant whoever edits the file, so it's obviously stored somewhere. Maybe it's not available in the XML though, only stored in the DB?

Best regards,

Chris
http://www.ava.co.uk

Chris Houston - Business Dev Director for Ava / CTO for Clik Media Group / Umbraco Developer
tim
Posted: Friday, December 14, 2007 1:04:36 PM

Rank: Addict

Joined: 2/19/2007
Posts: 738
Location: Belgium
Indeed it must be stored. Try looking at the db and creating an xslt extension that will fetch the Name.

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.