Hajime Fujimoto wrote an entry about MT's category technique.
He found a question about MT's category at Japanese SNS service named "mixi". The summary of that question is like this;
*There are two blogs. One is named "recommended restaurant" and other is "recommended cafe".
*They have the same categories with same name.
*The questioner wants to make an entry list. An entry list is pulling entry data from each blogs, belonging to the same category.
To this question, Hajime made some answers in his entry.
Let’s check the master's answers.
1.Using <mt:Entries> tag with "include_blogs" modifier and "category" modifier
You can use <mt:Entries> block tags with some modifier.
<mt:Entries include_blogs="2,3(blog's IDs)" category="foo">
*An entry list will be created here.
</mt:Entries>
In this case, you must have the same category structure with each.
If each blog's category structure is different, this code cannot publish the right results.
2.Using <mt:TopLevelCategories> tags
Another way is like this;
<mt:TopLevelCategories>
<$mt:CategoryLabel setvar="cat_label"$>*You can write a category information here
<mt:Entries include_blogs="2,3(blog's IDs)" category="$cat_label">
*An entry data from each blog will be published.
</mt:Entries>
<$mt:SubCatsRecurse$>
</mt:TopLevelCategories>
With this code, Hajime entered a category's name to a variable named "cat_label".
If you want to make an entry list on THE TOTALLY DIFFERENT BLOG, (not on these blogs which have same categories) you can use <mt:Blogs> block tags.
<mt:Blogs include_blogs="10">
<mt:TopLevelCategories>
<$mt:CategoryLabel setvar="cat_label"$>*You can write a category information here
<mt:Entries include_blogs="2,3(blog's IDs)" category="$cat_label">
*An entry data from each blog will be published.
</mt:Entries>
<$mt:SubCatsRecurse$>
</mt:TopLevelCategories>
</mt:Blogs>

Leave a comment