Has anyone done a blog type system in a matrix site?
There are a couple of things short term that we could squeeze into blog functionality pretty well, and longer term we are looking at ways of allowing public feedback on any of our pages.
At this point I am thinking having stuff in an external DB seems like the most workable solution. But if someone has done something similar can you please let me know how.
Thanks
Blogs
You can use an asset builder to add new articles to a blog folder. Then use an asset listing to list them in publish order. You could use a simple edit interface to make the editing look nice. For comments, you use another asset builder than allows users to add comments to an article, then a listing to list them. All that gets contained inside a paint layout with dynamic root nodes to add to/list from the current article. Comments can also include a rating for your article if that interests you.
So basically, you can use the tools Matrix provides to build a blog, but it will be complicated to setup. The benefit is that you can tweak just about every little thing.
To sum up:
--------------
1. Create an Asset Builder for adding comments (Additional Create Locations - Current Asset, remember to set Permitted Tree Locations and Permitted Asset Types!)
2. Create Asset Listing for listing comments (dynamic root node - Current Asset - assetid)
3. Create Metadata Schema w/ fields that you want to have in comments, i.e. Author, E-mail, WWW etc.. and apply it properly
4. Create a Paint Layout for your Articles and apply it on your 'Articles' folder.
a) customise Paint Layout so that you have
- asset content
- 2x nested content (for both creating comments and listing comments)
B) use metadata values for displaying comments fields
Let us know if you have any problems, it should not be difficult!
Is there any way to suppress
[color="#FF0000"][ ** RECURSION WARNING ** ]
You are nesting the content of this page inside itself
I understand why you would want that error there, but sometimes recursion is the best way to do things. In this case I am trying to nest the asset listing that lists comments inside itself so we can get comments on comments.
The only other way I can see of doing this is to have a separate asset listing for each level of comments you wanted to allow, but that is more work and offers less flexibility and functionality.
It prevents Matrix from entering an endless loop (and bringing your server to its knees). You might want to look at Paint Layouts instead of nesting asset listings, perhaps.
I fully understand how recursion can be a system killer, in this case though it can't enter an endless loop as eventually it is going to run out of comments and the no results body copy doesn't return anything so ending the recursion.
I am taking it from your reply that the answer is no, there is no way to suppress that warning.
If so I will just have to make a single level of comments as apposed to a threaded system, not ideal but hardly a deal breaker either.
The way around it is not to nest the Asset Listing into itself. Rather, use Paint Layouts to nest the Asset Listing at each level of comments. So, the page itself nests an asset listing that lists comments and the Comments have a Paint Layout that nests the same asset listing to list comments to comments, etc, etc.
So I have created a 'What's New' blog that lists 'News Items'. Each News Item is painted with a comments asset builder and any comments that may have been created by site users.
The next step that I'm having difficulty thinking through is how to organize the news items by category. I figure I can assign metadata tags that represent category names. But how would I create a side nav that lists these 'categories' where a user could click on a link labeled 'Digital Television', and pull up every news item related to Digital Television?
The easiest way to do this (in my mind) is to use folders as categories. Then, on your asset builder, you expose the folders as create locations and allow users to create the news items in multiple folders. You can then display all the news items in the main list, or just list news items in a particular folder in order to list a particular category.
The way around it is not to nest the Asset Listing into itself. Rather, use Paint Layouts to nest the Asset Listing at each level of comments. So, the page itself nests an asset listing that lists comments and the Comments have a Paint Layout that nests the same asset listing to list comments to comments, etc, etc.
Not such a great idea. I just did that and for one it lists the comment asset builder form underneath every content (should be able to toggle this) and secondly, when making a comment it replicates many times and all the comments still end up on the bottom of the page.