Help - Search - Members - Calendar
Full Version: Master Archive Dates question
Movable Type Community Forum > Additional Resources > Tips and Tricks
Kevin White
Okay, I think I have most of my archive format sussed out--at least as far as how I want it to look. I'll have one of the full screen calendars for Monthly (which is like Daily and Monthly together), a Paginated Category archive, an archive section for my old site, Recent Posts on the front page... I'll have a question or two about Paginate and about the full-screen calendar no doubt, but for now:

Question 1: I was thinking of doing a kind of "Master List" as well. this is what I have so far--not much I know (and the look will change). I also want to add Category labels, which I think I know how to do. My question is how do I group the posts by date--instead of the date being listed for each entry, how about only once for each day, and then each entry for that day underneath it?


Question 2: You know the descriptions entered for each category in MT? Is there a tag to use so that those can either come up as ToolTips (title) when someone mouses over the link for that Category, or at least at the top of each Category archive page?

Thanks again, kind folks! smile.gif
milbertus
QUOTE
Question 1: I was thinking of doing a kind of "Master List" as well. this is what I have so far--not much I know (and the look will change). I also want to add Category labels, which I think I know how to do. My question is how do I group the posts by date--instead of the date being listed for each entry, how about only once for each day, and then each entry for that day underneath it?


The ArchiveDateHeader plugin might do the trick. It adds and tags, which are to be used in the context of . I use it to display year headers for my listing of months.

QUOTE
Question 2: You know the descriptions entered for each category in MT? Is there a tag to use so that those can either come up as ToolTips (title) when someone mouses over the link for that Category, or at least at the top of each Category archive page?


There is an MT tag to do that. Just use the <$MTCategoryDescription$> tag something like this:
CODE
<MTCategories>
<a href="<$MTCategoryArchiveLink$>" title="<$MTCategoryDescription remove_html="1"$>"><$MTCategoryLabel$></a>
</MTCategories>
Kevin White
Thanks!

#2 worked well the first time.

For the Master Archive, I decided to go in a different direction, with a table. I'm having trouble just getting the Daily Archive tag to work (click on a date, it brings up the two or four or five entries from that day on one page) and I have no idea what the problem using MTCategoryLabel "out of context" is. I could just do the date the way it is now and the category as well (i.e., just text, no link), but I can't even get the category name to come up at all.
girlie
What is the code you're currently using to display the list of daily archives?
Kevin White
Currently I don't have the Category thing in there, since MTCategoryLabel returned an error every time.

This is everything after the banner in the Master Archive Index:

CODE
<div id="master">
<div class="blog">
<div class="blogbody">
<blockquote><blockquote>
<center>
<TABLE BORDER="5" CELLSPACING="3" CELLPADDING="3">

<MTArchiveList>

<TR>

<TD ALIGN = "left"><b>  <a href="<$MTArchiveLink$>">• <$MTArchiveTitle$></a>  </b></TD>

<TD ALIGN = "right">  <MTArchiveDate format="%A, %x">  </TD>

</TR>

</MTArchiveList>

</TABLE>
</center>
</blockquote></blockquote>

</div>
</div>
</div>


And this is the master definition in the stylesheet:

CODE
#master {
 float:center;      
 width:89%;
                               font-size:x-small;
                               background:#000000;
 margin-left:0px;
 margin-bottom:0px;
 }


I know the style sheet entry looks weak and isn't doing much right now, and the whole style sheet could use some sprucing up.

I want to:

A) affect the text size/style (no matter what I do in the style sheet or Master Archive Index, the text style in the table will not change)

--------------------------

B) convert the days of the week into the same kind of page you get if you click on a date in the calendar--it brings up all entries for that day--like Monthly but only for one day...

I tried this:

CODE
<a href="<MTArchiveList archive_type="Daily">"><MTArchiveDate format="%A, %x"></a>


(inside a table code, of course), and it turned out pretty wrong--it listed all dates I've made a post, to the right of EACH entry, and only the first date listed was a link, and it only linked to the main index page. If it's impossible I can live with not having links for the dates.

--------------------------

C) add Category names and/or links--I really just need to know the tag to use instead of MTCategoryLabel, or just tell me it's impossible and I'll move on

I tried this:

CODE
<MTEntryCategories>
<a href="<$MTCategoryArchiveLink$>" target="_blank"><$MTCategoryLabel$></a></MTEntryCategories>


but it gave an error on Rebuild every time, no matter the changes--MTCategoryLabel used "out of context". wink.gif
girlie
A) Are you changing the font settings in the blogbody class in your stylesheet? That's the one you need to aim for - unless you have no font definitions at all in that class?

B) I may be a little confused about this one - if you're trying to link to a Daily Archive page, there is no Category Name to reference - as a Daily page could include entries in various categories, not just one category. Are you saying you'd rather have a listing by category instead of date? Or tell me what it is about the code that you ARE using that doesn't do what you want.

C) (which may tie into B): Use <MTArchiveList archive_type="Daily"> instead of just <MTArchiveList> in the code you're already showing above.

Does any of that help?
Kevin White
Sorry, I had the code juxtaposed. sad.gif
Kevin White
I had the code backwards (in this thread), but now it's correct. But from what you say, I'm gathering that the reason you can't use MTCategoryLabel anywhere but in an entry or sidebar is because it could conceivably have more than one Category per post (although I just pick one Category, the one that seems closest).

I just thought I'd have a table listing all the posts by title in Column A, their dates in Column B, and their Categories in Column C. As a bonus, I thought the dates would be links to a page showing all entries for that day, although that might not be of much worth, since all the posts are listed right there in the archive by day.

If I can't get Category labels to work, I might go back and make the Excerpts a five or six word description and then stick that in Column C. I'm sure that would work. smile.gif

I made a .blogbody2 in Stylesheet and changed the Master Archive Index to reflect that, but I still can't touch text size. Baffling.
girlie
Hmmm? I don't quite understand what you mean? The code still looks the same to me.

What I'm saying about MTCategoryLabel is that it works in the context of an MTCategories list, but not any type of Date-Based Archive List (unless you've included an MTEntries tag in there, in which case you want to use <MTEntryCategory>). A Date-Based Archive (Daily, Weekly, Monthly) does not have a single category associated with it.

Now, if you want a listing of each entry, with a date linking to the Daily Archive page, and with the primary category of that entry, one way to do that is this:

CODE
<MTEntries>
<MTEntryTitle>
<a href="<MTEntryLink archive_type="Daily">"<MTEntryDate></a> <MTEntryCategory>
</MTEntries>


You'd have to play around with getting the table code in there correctly.
Kevin White
Well, I got it to a semblance of what I envisioned. I'll leave it at that for a while. On to the calendar and Pagination.

Your Daily Archive code worked, and for Category I just fooled it by using the MTEntries tags around MTEntryCategory--no links, but that's why the sidebar and all the entries have links.

It's not pretty, but it's a quick way to have a master archive. I had a similar page here for my old Diaryland site. Maybe I'll have to Paginate this itself (more frequent posts in a blog), but not as soon as it's just a list and not the entries themselves.

Thanks for the help. smile.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-2009 Invision Power Services, Inc.