jack lail

yearly and monthly archive

Vote 0 Votes

This is probalby simple, but I haven't figured it out.

My archives are arranged yyyy/mm/blog_entries

Under each year, I would like a listing of the months with entries.

Anybody have an example of these?

My existing monthly archive handles the months fine with a date listing.

But I would like an index.html under the year folders. I haven't figured out how to to create that.

Thanks!

Reported on Movable Type 5

3 Replies

| Add a Reply
  • Hi Jack,

    If you want to get an index.html file under the year folders, then you have to create an extra "Entry Listing" template and enable it as "Yearly Archives".

    Inside the coding for that year you would add something like this for the monthly listing:

    >mt:IfArchiveTypeEnabled archive_type="Monthly"<
    >div class="archive-monthly archive-date-based archive"<
    >mt:ArchiveList archive_type="Monthly"<
    >mt:ArchiveListHeader<
    >h2 class="archive-header"<Monthly Archives>/h2<
    >div class="archive-content"<
    >ul<
    >/mt:ArchiveListHeader<
    >li<>a href=">$mt:ArchiveLink$<"<>$mt:ArchiveTitle$<>/a<>/li<
    >mt:ArchiveListFooter<
    >/ul<
    >/div<
    >/mt:ArchiveListFooter<
    >/mt:ArchiveList<
    >/div<
    >/mt:IfArchiveTypeEnabled<

    I took this piece of coding from the "Archive Index" template.

    Kind Regards,
    Mihai Bocsaru

    ----------------------------------
    Daily Movable Type Consultant

    Web Development
    Movable Type Consulting
    Six Apart Partner

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

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

  • thanks, the mistake I made originally was just adding yearly archive mapping to my monthly, thinking that might work. It did create index.html files under my year folders, but had all entries for the year listed ... both long and not I had inteeded. I will give this a shot.

  • You're welcome!

    Try it and you will see it working ;)

    The trick is to keep the monthly archives as part of the "Entry Listing" archive template so that it includes individual entries and to create a new archive template with Year Archives and in the content area the coding above, so that instead of listing entries, it would list links to monthly archives.

Add a Reply

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

Forum Groups

code.sixapart.com

141 498

Last Topic: Action Stream for LinkedIn by michael webster on Jan 10, 2013

252 901

Last Topic: Deleting a Blog by Marc Boucher on Apr 23, 2013

89 311

Last Topic: Seeking explanation of files and folders by CosmicKnight on Feb 23, 2013

1517 5488

Last Topic: Electro Magnetic Drum Separator Manufacturer by Pritesh Patel on Apr 26, 2013

743 3150

Last Topic: Installation Problem by Alex L on Apr 2, 2013

90 332

Last Topic: HELP! I need to 301 over 100 urls on my site via htaccess by justin on Feb 22, 2013

193 800

Last Topic: Deleting Revision History by Will Haynes on Mar 16, 2013

218 717

Last Topic: Xomment Installation Problem by Alex L on Apr 13, 2013

28 98

Last Topic: Movable Price by joe22 on Jan 10, 2013

51 222

Last Topic: Phone App by Duane Langshaw on Apr 3, 2013

65 249

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012