Thanks dirk but i seem to be missing something in order to be able to use the presenation.nodeFactory:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'node' does not exist in the namespace 'umbraco.presentation.nodeFactory' (are you missing an assembly reference?)
Source Error:
Line 11: <%= umbraco.library.GetDictionaryItem("by") %> Line 12: <umbraco:Item field="writerName" runat="server"></umbraco:Item> Line 13: <%= umbraco.presentation.nodeFactory.node.GetCurrent().CreatorName %> Line 14: Line 15: </span>
how do i output the creatorName in a page template?
I'm having issues outputting the name of the author that created a blogpost, for some reason it doesn't output anything?
In xslt it's displayed elsewhere like this:
but in the page template i don't have this variable available?
This piece of code always returns a blank output:
This is the information that's in the database for the node that i'm testing with (created with livewriter)
All help is appreciated!
http://en.wikibooks.org/wiki/Umbraco/Reference/Umbraco_XML_Format
Use the @writerName to output the publisher of the document.
/Patrik
Rik,
use
to get the creator's name from the node
Cheers,
/Dirk
Thanks dirk but i seem to be missing something in order to be able to use the presenation.nodeFactory:
Patrick: i need the creatorname, not the writername ;)
Dirk: Thanks i got it, the there was an error with capitalisation of the "nodes" part in your case , this fixed it:
Yup, my bad! Glad you sorted that out!
Cheers,
/Dirk
Hello,
i'am sorry for posting this under solved problems...
Why doesn't it work for @nodeName?
I get: CS0117: 'umbraco.presentation.nodeFactory.Node' does not contain a definition for 'nodeName'
Thx,
Andraž
Because nodeName is not defined as property on a node object, use .Text to get the name of the node as it appears in the conten tree.
Cheers,
/Dirk
I did that, so i have now:
but i'am still getting the same error.
Oops, use .Name instead...
Cheers,
/Dirk
Great, thanks :)
Andraž
is working on a reply...