Help - Search - Members - Calendar
Full Version: Different Archive Categories All Lead to One Place
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
bmacewen
My blog has been up for a few months (long enough to generate meaningful archives) and today I tested them for the first time.
Sorry to report that a few areas need re-working, and my MT skills are not up to the task of diagnosing it. I sincerely hope that all are somehow "related" so that if I understand what's wrong with one I can understand what's wrong with the others.

First, clicking on any day where there was a post in the monthly-calendar display always leads to the most recent post.

Here's the code:

CODE
<div align="center" class="calendar">


<MTArchiveList archive_type="Monthly" lastn="3">

<table border="0" cellspacing="4" cellpadding="0" summary="Monthly calendar with links to each day's posts">
<caption class="calendarhead"><$MTArchiveDate format="%B %Y"$></caption>
<tr>
<th abbr="Sunday" align="center"><span class="calendar">Sun</span></th>
<th abbr="Monday" align="center"><span class="calendar">Mon</span></th>
<th abbr="Tuesday" align="center"><span class="calendar">Tue</span></th>
<th abbr="Wednesday" align="center"><span class="calendar">Wed</span></th>
<th abbr="Thursday" align="center"><span class="calendar">Thu</span></th>
<th abbr="Friday" align="center"><span class="calendar">Fri</span></th>
<th abbr="Saturday" align="center"><span class="calendar">Sat</span></th>
</tr>

<MTCalendar month="this">
<MTCalendarWeekHeader><tr></tr></MTCalendarWeekHeader>

<td align="center"><span class="calendar">


<MTCalendarIfEntries>
<MTEntries lastn="1"><a href="<$MTEntryPermalink$>" class="calendar"><$MTCalendarDay$></a>
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries><$MTCalendarDay$></MTCalendarIfNoEntries>
<MTCalendarIfBlank> </MTCalendarIfBlank></span></td>
<MTCalendarWeekFooter></tr></MTCalendarWeekFooter></MTCalendar>
</table>
</MTArchiveList>

</div>


Second, clicking on any "Archive by Category" always leads to a display of the "Leadership" Category (10th in a list of 12 categories). That code is here:
CODE
<div class="sidetitle nonlinkingsidetitles">
Archives by Category
</div>

<div class="side">
<MTArchiveList archive_type="Category">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a><br />
</MTArchiveList>
</div>>

Third, clicking on any Month listing (April 2004...March 2004..etc.) always leads to the current month.

Here's that code:
CODE
<div class="side">
<MTArchiveList archive_type="Monthly">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a><br />
</MTArchiveList>
</div>


Finally, clicking on any individual entry by name always leads to the most-recent entry.
CODE
<div class="side">
<MTEntries lastn="10">
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</div>

I realize this is a long post but I wanted to provide as much info as possible in case there's an "obvious" problem in one area that makes the diagnosis of the others relatively trivial.

TIA to all....
shelley
The links in the calendar all go to a file named template.individual-entry.archive.html.

The links in Archive by Category all go to a file named template.category.archive.html.

The links in the Monthly Listing all go to a file named template.date-based.archive.html.

The links for Individual Entries all go to a file named template.individual-entry.archive.html.

So, it looks like there is some basic misunderstanding here about the use of either "link this template to a file" and/or Archive File Templates (the feature on the Weblog Config > Archiving screen that allows you to control the way files are named).

Since the second is the more likely culprit, let's start there: do you have anything in the fields in that column on that screen?

By the way, once you reply to this, we'll be moving it outside of Bug Reports. Please don't report something as a bug until you know for certain that it is; otherwise, the Bug forum loses its usefulness. wink.gif
shelley
And just as a reminder so we don't forget it later after we get the basic problem resolved: your Individual Entry Archive Template should not have and tags in the main content area.
bmacewen
Shelley: Many thanks, and sorry for the hiatus; I was away for nearly 24 hours.

I will readily plead guilty to some "basic misunderstanding" about archives in general--although I think I've gotten the hang of templates at this point.

In any event, I have now configured my blog (and rebuilt it) as follows:


Individual archives go to template.individual-entry.archive.html

Daily archives go to template.date-based.archive.html

Weekly archive is not selected (i.e., turned off)

Monthly archives go to template.date-based.archive.html

Category archives go to template.category.archive.html

FWIW, I have not linked any of these template files to an "external" file for editing.

So. where do we go from here (this by itself does not seem to have changed the behavior I'm experiencing).

And, last but not least, I apologize for posting this to 'bug reports'--I assume you'll be moving it to "Templates"? mellow.gif
shelley
When you say these files "go to [template]" do you mean that yes, you put those template names in the Archive File Templates column on the Weblog Config > Archiving screen?

If so, that is what I'm saying is the problem. In effect, you're telling MT to write every archive to the same file. You don't want to do that. Each archive should generate a unique page. For example, with Monthly archives, March would be on one page, April on another, and so on.

So try removing those names from that column, SAVE on the Archiving page, and then rebuild your site. That will cause MT to generate files using its default structure. Then we can go from there if you want them named differently.
bmacewen
Shelley: You diagnosed it 100% correctly. All I needed to do was to remove those (four) references, rebuild, and voila!

biggrin.gif

Now, if my ambition is indeed to customize the MT default archive templates, how do I accomplish that without un-doing what you just helped me achieve?

Thanks again,

:Bruce
shelley
Start by reading about Archive File Templates to understand what options you can use there. The key is using MT Template Tags, not real file names.

Once you post back to this topic, I'll be moving it to Template Problems. wink.gif
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-2008 Invision Power Services, Inc.