Im trying to get the 3 most recent uBlogsy Posts to appear on a homepage,
I can get them displaying but just struggling to get the author name to appear with each post. At the moment it just displays the node ID number of each particular author and not their name
The line in question is:
@n.GetProperty("uBlogsyPostAuthor")
I just need to be able to display the name and not the nodeID
Okay if you look in this folder \Views\Partials\uBlogsy you can find a file called uBlogsyPostListAuthors this is the file that is used for listing the authors on each post.
Hope this can help you to get an idea how you can get the author name instead of the id.
What if you do some thing like this.
var author = n.GetProperty("uBlogsyPostAuthor");
@author.GetPropertyValue<string>("uBlogsyAuthorName")
Posts on Homepage
Im trying to get the 3 most recent uBlogsy Posts to appear on a homepage,
I can get them displaying but just struggling to get the author name to appear with each post. At the moment it just displays the node ID number of each particular author and not their name
The line in question is: @n.GetProperty("uBlogsyPostAuthor")
I just need to be able to display the name and not the nodeID
Any help with this much appreciated.
Thanks
Hi jools,
Try to use this code below instead.
Hope this helps,
/Dennis
Thanks for the response Dennis, I tried that line of code but when I view the page in browser, I see this error message:
Error loading Partial View script (file: ~/Views/MacroPartials/uBlogsy/ListPosts.cshtml)
Doesn't seem to like the
Hi Jools,
Okay if you look in this folder \Views\Partials\uBlogsy you can find a file called uBlogsyPostListAuthors this is the file that is used for listing the authors on each post.
Hope this can help you to get an idea how you can get the author name instead of the id.
What if you do some thing like this.
/Dennis
is working on a reply...