bri-man

Blog index for a single blog

Vote 0 Votes

I've upgraded to MT 5.02, and am using the professional website theme and the professional blog theme.

I'm only running a single blog on my site.

How do I set it up so that the "blogs" in the navbar goes directly to the blog, instead of to a page which aggregates posts from all of the blogs on the site? Since there's only 1 blog, there's no need for the aggregate blogs/index.htm page...

Many Thanks!
b

Reported on Movable Type 5

3 Replies

| Add a Reply
  • You will have to edit template module "Navigation" from inside the parent website.

    Basically, you would go to the parent website, and then to:

    Design -> Templates -> Template Modules

    Open the template module called "Navigation"

    Then replace:

    <mt:WebsiteHasBlog>
    <li class="<mt:If name="blog_index"> on</mt:If>"><a href="<$mt:BlogURL$>blogs/">Blogs</a></li>
    </mt:WebsiteHasBlog>

    with the following coding:

    <mt:WebsiteHasBlog>
    <mt:Blogs include_blogs="children">
    <li><a href="<$mt:BlogURL$>">Blog</a></li>
    </mt:Blogs>
    </mt:WebsiteHasBlog>

    if you have more than one children blog, you could specify a specific blog id by replacing:

    <mt:Blogs include_blogs="children">

    with:

    <mt:Blogs include_blogs="children" blog_ids="99">

    (in this sample I've assumed that the children blog you want to link from the top navigation has the blog id 99)

    ----------------------------------
    Mihai Bocsaru

    Web Development
    Movable Type Consulting
    Six Apart Partner

    http://www.pro-it-service.com/
    ----------------------------------

    Movable Type Demo
    http://www.movabletypedemo.org/

  • Thanks... that covers the website part of the site, but the navigation on the blog still lists "blogs", and links to that aggregate page. I didn't see the same code in the navigation template for the blog.

    What changes should I make there?

  • OK... I think I figured it out (although there's probably a better way to do it...)

    I replaced the following code:


  • ">Home

  • blogs/">Blogs

  • with


  • ">Home

  • ">Blog

  • and all seems to work correctly...

    Is there a better way to do this?

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1774 6167

Last Topic: Template modules by Zielun on Feb 16, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1434 5088

Last Topic: Maintenance announcement by Nick on Feb 17, 2012

695 2912

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

174 740

Last Topic: Captcha images rendering slowly by ScottM on Feb 12, 2012

190 568

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012