Help - Search - Members - Calendar
Full Version: Archiving Style
Movable Type Community Forum > Additional Resources > Tips and Tricks
lollybob_tt
Hi, im trying....and trying and trying to get this to work. huh.gif

CODE
<MTArchiveList archive_type="Monthly">
    <MTArchiveDateHeader>
    <h3>
    <MTArchiveDate format="%Y">
    </h3>
    </MTArchiveDateHeader>


<ul>

<li><a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a> · <$MTArchiveCount$></li>

</ul>
</MTArchiveList>


what im trying to acheive is

CODE
<h3>Year</h3>
<ul>
<li>month 1</li>
<li>month 2</li>
<li>month 3</li>
</ul>

but i'm getting...

<h3>Year</h3>
<ul>

<li>April 2004</li>

</ul>
    


<ul>

<li>March 2004</li>

</ul>


can anyone help me to sort this out? Moving the
CODE
<MTArchiveList>
just messes up the entire layout. sad.gif
almuhajabah
Anything that you put inside the MTArchiveList container will be repeated for each item in the archive list, that's why it keeps repeating.

Ordinarily, I'd tell you to move the ul tags outside of MTArchive List but I'm not sure what that would do with your ArchiveDateHeader.

Have you considered doing it another way than a list?
lollybob_tt
Thanx for the answer... i changed the code to

CODE
<MTArchiveList archive_type="Monthly">
    <MTArchiveDateHeader>
    <h3>
    <MTArchiveDate format="%Y">
    </h3>
    </MTArchiveDateHeader>


<p class="archives"><a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a> · <$MTArchiveCount$></p>
</MTArchiveList>


It works now , but each month listed has the year after it. i already have the year listed so how can i get rid of the year after each month?
almuhajabah
By default the MTArchiveTitle tag includes the year:

QUOTE
MTArchiveTitle
The ``title'' of this archive page. The value of this variable depends on the archive type:

(snip)

Monthly
The month, in Month YYYY form


I would suggest using the MTArchiveDate tag instead:

QUOTE
MTArchiveDate
The starting date of this archive period. This only makes sense if you are listing Daily, Weekly, or Monthly archives. This is a standard date tag; see below in Date Tag Formats for information on formatting the date.


That way you can use the date tag formats to only show the month and not the year.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.