Hi
Last year I moved my site to Umbraco and used Articulate, it's been great. I looked at options back then on how to merge two lists of blogs into one stream but hit a number of issues. I'm now looking to revisit the issue and I'm looking for your help again.
Rather than try and get my code to work I am hoping to look at a new fresh approach or use an example that someone else might have got to work.
I've two archives so my setup looks like:
Home
-Blogs
Blog 1
Archive
BlogPost
Blog 2
Archive
BlogPost
So I can display each individual list of blogs on the homepage without any issues. It was suggested I use a Union on the two lists but I could never get that to work.
I've had some time to think about this and I think I have been approaching it all wrong.
I had my template setup to pass the blog id to a partial view, the partial view then read the archive and displayed the list of posts. On the template I had 2 calls to the partial.
What I think I need to do is rewrite my partial view. Give the partial view both blog ids, not just one, and then merge the two lists within the partial. Maybe save each list into an array and merge them by date.
On my homepage template I call a partial view, within that partial I then search for all contents of my site with a document type 'ArticulateRichText', this pulled everything I needed and then I sorted it by date. Bingo!
Merge two lists, a fresh look at the problem
Hi Last year I moved my site to Umbraco and used Articulate, it's been great. I looked at options back then on how to merge two lists of blogs into one stream but hit a number of issues. I'm now looking to revisit the issue and I'm looking for your help again.
Rather than try and get my code to work I am hoping to look at a new fresh approach or use an example that someone else might have got to work.
I've two archives so my setup looks like:
So I can display each individual list of blogs on the homepage without any issues. It was suggested I use a Union on the two lists but I could never get that to work.
Looking forward to working this one out, Thanks.
I've had some time to think about this and I think I have been approaching it all wrong. I had my template setup to pass the blog id to a partial view, the partial view then read the archive and displayed the list of posts. On the template I had 2 calls to the partial.
What I think I need to do is rewrite my partial view. Give the partial view both blog ids, not just one, and then merge the two lists within the partial. Maybe save each list into an array and merge them by date.
Does this make sense? Is it possible?
Solved it!
On my homepage template I call a partial view, within that partial I then search for all contents of my site with a document type 'ArticulateRichText', this pulled everything I needed and then I sorted it by date. Bingo!
Hope this helps others.
is working on a reply...