<mt:OtherBlog>

Alias of multiblog

Example ΒΆ

<mt:OtherBlog>
  <!-- do something -->
</mt:OtherBlog>
This page was last updated on 2009-07-09, 11:43. [Edit]

2 Notes

Unfortunately, this page isn't terribly helpful. It cross-references MultiBlog. That isn't very helpful either.

There is fairly detailed information. It just isn't here. It's over in the designer section (why?), here.

This is a summary:

Where to configure it

Configure Multiblog ("MB", aka OtherBlog or "OB") from either the Preferences > Plugins in your admin interface or in your template code directly.

Attributes of blog_ids, include_blogs and exclude_blogs

To pull or leave out content from other blogs:

  1. Use a comma-delimited list of blog ids;
  2. Use "all" for all blogs

Examples

    <mt:MultiBlog include_blogs="1,5,8">
       <mt:Entries lastn="10">
          <p><mt:EntryTitle></p>
       </mt:Entries>
       <mt:Comments lastn="10">
          <p><mt:CommentBody></p>
       </mt:Entries>
    </mt:MultiBlog>


    <mt:MultiBlog include_blogs="all">
       <mt:Entries lastn="10">
          <p><mt:EntryTitle></p>
       </mt:Entries>
       <mt:Comments lastn="10">
          <p><mt:CommentBody></p>
       </mt:Entries>
    </mt:MultiBlog>


    <mt:MultiBlog blog_ids="1,5,8">
       <mt:Entries lastn="10">
          <p><mt:EntryTitle></p>
       </mt:Entries>
       <mt:Comments lastn="10">
          <p><mt:CommentBody></p>
       </mt:Entries>
    </mt:MultiBlog>

    <mt:MultiBlog exclude_blogs="1,5,8">
       <mt:Entries lastn="10">
          <p><mt:EntryTitle></p>
       </mt:Entries>
       <mt:Comments lastn="10">
          <p><mt:CommentBody></p>
       </mt:Entries>
    </mt:MultiBlog>

    <mt:MultiBlog blog_ids="all">
       <mt:Entries lastn="10">
          <p><mt:EntryTitle></p>
       </mt:Entries>
       <mt:Comments lastn="10">
          <p><mt:CommentBody></p>
       </mt:Entries>
    </mt:MultiBlog>

MB-Enabled Template Tags

These tags support the MB/OB syntax:

  • mt:entries
  • mt:comments
  • mt:categories
  • mt:pings
  • mt:assets
  • mt:tags
  • mt:tagsearchlink
  • mt:tagrank
  • mt:authors
  • mt:blogs
  • mt:blogcategorycount
  • mt:blogentrycount
  • mt:blogcommentcount
  • mt:blogpingcount

Important Note

MT:Entries also supports the blog_ids attribute. But doing

    <mt:MultiBlog include_blogs="3">
        <mt:Entries category="foozball">
            some yada yada
        </mt:Entries>
    </mt:MultiBlog>

is not the same thing as doing

    <mt:Entries blog_ids="3" category="foozball">
        some yada yada
    </mt:Entries>

The second expects that even if the blog with id No 3 does have a category called foozball, that very same category must also exist in the current blog.

So if you have this:

    BlogId 1, categories: foo, bar
    BlogId 3, categories: foozball, barbarosa

then the second example will fail, because foozball isn't a category in BlogId1 where you're invoking MB/OB.

Real subtle, that. Like 10 hours of hair-pulling subtle.

And for that very reason, it also won't work in a category archive.

Configuring MultiBlog/OtherBlog: Rebuild Triggers

One of the most important aspects of this tag/feature is the rebuild trigger. Without the trigger, MB/OB can actually increase your workload.

Let's say you have three blogs, Main, Projects and Code. You want to aggregate your posts from Projects and Code and have them appear on the index page of Main.

Using the example code above, you actually do this. But this also means that when you publish a post in Projects or Code you must republish the index page of Main too.

That's daunting.

Fortunately, MB/OB has the answer built-in, right from its early development as a plug-in. You specify a rebuild trigger.

Go to the Preferences > Plugins section in your admin interface/control panel of your aggregator blog (Main, the one in which you want to pull the content from the other sub-blogs).

Click on settings; Click on Create Rebuild Triggers. Specify the event, and the corresponding action.

For the example above you'd set up two triggers:

  1. When Projects publishes an entry, rebuild indexes;
  2. When Code publishes an entry, rebuild indexes;

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.