keystr13

Getting monthy archives

Vote 0 Votes

How can I change this code to get an archive link for each month, instead of now just a link for Jan 2012 and all 2009 archives.

<h3>Monthly Archive</h3>
					<MTSetVarBlock name="run_yyyy"><$MTDate format="%Y"$></MTSetVarBlock>
					<MTArchiveList archive_type="Monthly">
						<MTArchiveListHeader><ul id="monthlist"></MTArchiveListHeader>
						<MTSetVarBlock name="arc_yyyy"><$MTArchiveDate format="%Y"$></MTSetVarBlock>
						<MTSetVarBlock name="arc_mm"><$MTArchiveDate format="%m"$></MTSetVarBlock>
						<MTIf name="arc_yyyy" eq="$run_yyyy">
							<li><a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a></li>
						<MTElse>
							<MTIf name="arc_mm" eq="12">
								<li><a href="<$MTBlogURL$><$MTVar name="arc_yyyy">/">All <$MTVar name="arc_yyyy"> Archives</a></li>
							</MTIf>
						</MTIf>
						<MTArchiveListFooter></ul></MTArchiveListFooter>
					</MTArchiveList>

Reported on Movable Type 4.261

3 Replies

| Add a Reply
  • You could reach what you've mentioned by replacing that coding with the following one:

    <h3>Monthly Archive</h3>
    <MTArchiveList archive_type="Monthly">
    <MTArchiveListHeader><ul id="monthlist"></MTArchiveListHeader>
    <li><a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a></li>
    <MTArchiveListFooter></ul></MTArchiveListFooter>
    </MTArchiveList>

    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 for the help. But now, I need to move the new archive links over one character as the list is running up against the pictures, and does not line up with the categories list just above. How do I do that? poshposh.com for visual aid.

  • You're welcome!

    I've checked your layout and in order to fix your alignment issue, you will have to place the two widgets called "Categories" and "Monthly Archive" within the following div:

    <div class="content">
    and:
    </div>

    Then I would also recommend you to remove the following two divs from your layout, which are not opened:

    </div><!-- /body -->

    and:

    </div><!-- /footer -->

    Enjoy,
    Mihai

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

137 479

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

238 797

Last Topic: Manifest Schema Compatibility Issue When Restoring Blog by Matt on Oct 17, 2012

1858 6594

Last Topic: Categories and Basename Publishing Issues by e21media on Oct 25, 2012

88 307

Last Topic: absolute publish date in Manage Entries screen by .mau. on Apr 18, 2012

1488 5347

Last Topic: Anti-cloning by .mau. on Oct 29, 2012

732 3093

Last Topic: Blog moved server - now users cannot access blog? by mowgs on Oct 30, 2012

89 317

Last Topic: How to "pretify" a url in htaccess with a few wildcards by Caio on May 30, 2012

183 771

Last Topic: Commenting with TypePad by Rob Ferrara on Oct 17, 2012

212 680

Last Topic: Does MT-Approval work in MT5? by DLpres on Sep 25, 2012

27 100

Last Topic: Upgrading MT by Caio on Oct 15, 2012

49 224

Last Topic: Movable Type 6 Ideas by Caio on May 28, 2012

65 248

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