I'm a bit of a newb to XSLT and have been creating a company blog using blog 4 umbraco. I would like to know how to create a list on the blog page that enables the user to view all posts by a single author.
Ideally it would look the same as the tags/categories list with each entry displaying a number representing the amount of posts available.
I have looked around the forum and can't find anything similar, any help is appreciated.
Just for reference I'm using Umbraco 4.6.1 with Blog4Umbraco 2.0.26.
You could create an xslt extension in which you use Linq2Umbraco to fetch the correct data. Here is a start:
public static XPathNodeIterator GetBlogData(int id) { BlogPost post = ( from blogPost in UmbracoDataContext.BlogPosts where blogPost.CreatorID == id select blogPost ).Single();
//TODO convert data into XPathNodeIterator. Something like this: //XDocument index = new XDocument( // new XDeclaration("1.0", "utf-8", "yes"), // new XComment("Return the data of an blog"), // new XElement("blog", // new XElement("title", post.Title), // new XElement("text", post.Text) // ) // );
Thanks for your reply Jeroen, I will have a look into creating the list using this method.
Is creating a new umbraco extension essential for this type of function? or is it possible to do this with the existing blog4umbraco setup using a customised XSLT file?
Apologies for my ignorance, but I'm a front-end designer who has been tasked with quite a few back-end development jobs on this project.
Filtering blog posts by author via Blog 4 Umbraco
Hi all,
I'm a bit of a newb to XSLT and have been creating a company blog using blog 4 umbraco. I would like to know how to create a list on the blog page that enables the user to view all posts by a single author.
Ideally it would look the same as the tags/categories list with each entry displaying a number representing the amount of posts available.
I have looked around the forum and can't find anything similar, any help is appreciated.
Just for reference I'm using Umbraco 4.6.1 with Blog4Umbraco 2.0.26.
Cheers
Any takers?
Does anybody have any solutions to this please guys? It's proving quite hard finding info/help on this issue.
You could create an xslt extension in which you use Linq2Umbraco to fetch the correct data. Here is a start:
Jeroen
Thanks for your reply Jeroen, I will have a look into creating the list using this method.
Is creating a new umbraco extension essential for this type of function? or is it possible to do this with the existing blog4umbraco setup using a customised XSLT file?
Apologies for my ignorance, but I'm a front-end designer who has been tasked with quite a few back-end development jobs on this project.
is working on a reply...