Help - Search - Members - Calendar
Full Version: Archives, pagination ....
Movable Type Community Forum > Additional Resources > Tips and Tricks
fresco
I was reading the forums' pagination threads untill oblivion... Please help.

This is what I need, I know it should be simple, but i suppose I have seen way too many posts/options and got lost. May be typing will clear my head.

Here:

I have archives Individual, Monthly and by Category:

Individual Archives are fine-

Monthly in Archives I want entries listed by Cats like this:

Cat Title 1
Entry title
Entry title
........
Entry title

Cat Title 2
Entry title
Entry title
.......
Entry title
Cat Title 3

etc., etc.


I need Category Archive index page to list everything for the calendar year separated by months if possible

June 2003
Entry title
Entry title
........
Entry title

July 2003
Entry title
Entry title
.......
Entry title
August 2003

etc., etc.

Here is where the Pagination comes in: I would like Category archives to be broken into pages by Year.

2003 - 2004 - Etc.

I feel I can do it without MTPaginate plugin (i do not see how I can do it with it anyway and also I would like to keep html files in archives)
fresco
QUOTE (fresco @ Jul 2 2003, 09:23 AM)
Monthly in Archives I want entries listed by Cats like this:

Cat Title 1
      Entry title
      Entry title
      ........
      Entry title

Cat Title 2
      Entry title
      Entry title
      .......
      Entry title
Cat Title 3

etc., etc.

Ok, I've got this one figured out....
fresco
QUOTE (fresco @ Jul 2 2003, 11:13 AM)
Ok, I've got this one figured out....

Not really, it does not respect months! I have original template code above my edit that is limited to 3 entries. Than I have edited code that does the cat separation but it includes posts from all months.

I need it to show only current month!
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />

<title><$MTBlogName$>: <$MTArchiveTitle$> Archives</title>

<link rel="stylesheet" href="<$MTBlogURL$>styles-site.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<$MTBlogURL$>index.rdf" />
<link rel="start" href="<$MTBlogURL$>" title="Home" />
<MTArchivePrevious>
<link rel="prev" href="<$MTArchiveLink$>" title="<$MTArchiveTitle encode_html="1"$>" />
</MTArchivePrevious>
<MTArchiveNext>
<link rel="next" href="<$MTArchiveLink$>" title="<$MTArchiveTitle encode_html="1"$>" />
</MTArchiveNext>

<script language="javascript" type="text/javascript">
function OpenComments (c) {
   window.open(c,
                   'comments',
                   'width=480,height=480,scrollbars=yes,status=yes');
}

function OpenTrackback (c) {
   window.open(c,
                   'trackback',
                   'width=480,height=480,scrollbars=yes,status=yes');
}
</script>

</head>

<body>    

<div id="banner">
<h1><a href="<$MTBlogURL$>" accesskey="1"><font size="6"><$MTBlogName$></font></a> <br />
<font size="6"><$MTArchiveTitle$> Archives</font>
<br />
 <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-style: dotted; border-width: 1; font-weight: normal" bordercolor="#C0C0C0" bgcolor="#FFFFFF" width="70%">
   <tr>
     <td width="100%">
<span class="description"><p><$MTBlogDescription$></p></span>
</td>
   </tr>
 </table>
</h1>

</div>

<div id="container">

<div class="blog">

<div id="menu">
<MTArchivePrevious>
<a href="<$MTArchiveLink$>">« <$MTArchiveTitle$></a> |
</MTArchivePrevious>
<a href="<$MTBlogURL$>">Main</a>
<MTArchiveNext>
| <a href="<$MTArchiveLink$>"><$MTArchiveTitle$> »</a>
</MTArchiveNext>
</div>

</div>

<div class="blog">
<MTEntries lastn="3">
<$MTEntryTrackbackData$>

<MTDateHeader>
<h2 class="date"><$MTEntryDate format="%x"$></h2>
</MTDateHeader>

<div class="blogbody">
<a name="<$MTEntryID pad="1"$>"></a>

<h3 class="title"><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></h3>
    <$MTEntryExcerpt$> <$MTEntryEditLink$>  <a href="<$MTEntryPermalink$>">Read Full Article</a><br />

<div class="posted">
    Posted by <$MTEntryAuthor$> at <a href="<$MTEntryPermalink$>"><$MTEntryDate format="%X"$></a>
    <MTEntryIfAllowComments>
    | <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>
    </MTEntryIfAllowComments>
    <MTEntryIfAllowPings>
    | <a href="<$MTCGIPath$><$MTTrackbackScript$>?__mode=view&entry_id=<$MTEntryID$>" onclick="OpenTrackback(this.href); return false">TrackBack</a>
    </MTEntryIfAllowPings>
</div>

</div>

</MTEntries>
</div>


<div class="blog">
<div class="blogbody">
<MTCategories>
<a name="top"></a><font size="1"><a href="#<$MTArchiveCategory$>"><$MTArchiveCategory$></a> | </font>

</MTCategories>
<br />
<br />
<hr>
<MTCategories>

<center>
<a name="<$MTArchiveCategory$>"></a>
<b><$MTArchiveCategory$>     </b><a href="#top" title="TOP MENU"><font face="Times New Roman" size="3" color="#3366CC">▲</font></a></center>

<p align=left>
<MTEntries>
<$MTEntryTrackbackData$>
<MTEntryDate format="%m.%d.%Y">: <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br />
</MTEntries>
</p>

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

<div id="banner" align="center">

<table border="0" cellpadding="0" cellspacing="0">
 <tr>
   <td width="100%"><b><font face="Verdana" size="2"><font color="#808000">Have
   you added your site to</font> </font></b><a href="http://truefresco.org">
   <img alt="trueFresco.Org Home Page" src="http://truefresco.org/images/index_home.gif" style="border: none" border="0" width="18" height="18"></a><b><font face="Verdana" size="4">trueFresco.Org</font><font face="Verdana" size="2">
   <font color="#808000">Art Search & Art Link Directory?</font>
<br />
   <a href="http://truefresco.org/link_directory/suggest.php?action=addlink">
   Add your Website Now!</a> or <a href="http://truefresco.org/link_directory">
   Browse the Directory</a>.</font></b></td>
 </tr>
 <tr>
   <td width="100%">
<br />
<br />
<center><script language="JavaScript" src="http://www.truefresco.org/cgi-bin/webumake/wihchat.cgi?action=jsimage&img=directory"></script></center>

</td>
 </tr>
</table>
</div>
</body>
</html>


What is wrong?! Here is the page - you can see what I mean is wrong http://www.truefresco.org/2003_07.html
fresco
sorry for -bumping- it up, but I a need a bit of advice, please.
kadyellebee
Which template is it that you pasted here?

Kristine
fresco
that is my monthly template.

what I am trying to do is to have first five or so topics listed on my monthly page with exserpts - that is easy, just setup a limit.

and than below to have all entries for that month separated by category. One line at the time.

The template that I have posted does that but it lists everything that is in the archive and does not want to limit it to just one month.

You can follow the link above to see how it works but for now I had to remove the lower part and only have cats menu at the bottom.
However I trying to have that month entries listed separated by cats titles.

I have no problem figuring out cosmetics but how to tell MT not to list all existing entries.

is my post confusing?
girlie
The MTCategories tag is intended to list all categories in your blog (and their entries if you use the MTEntries tag within). Using it is contrary to the purpose of the Date-Based Archive, which is why you're getting all of the entries in your blog instead of just those in one month.

I don't know of any easy way offhand to have Date-Based Archives organized by category without having something like a sort_by="category" attribute for the MTEntries tag. The only thing I can think of would involve hardcoding some category names in there:

CODE
<MTEntries category="cat1name">
...
</MTEntries>
<MTEntries category="cat2name">
...
</MTEntries>
<MTEntries category="cat3name">
...
</MTEntries>
etc.
fresco
I do not mind doing that:

CODE
<MTEntries category="cat1name">
...
</MTEntries>
<MTEntries category="cat2name">
...
</MTEntries>
<MTEntries category="cat3name">
...
</MTEntries>

etc.

My problem is what do i put instead of "......" in your example?

How can I make my monthly page to show entries in blocks per category? I will add cat titles. Or what you saying is that
CODE
<MTEntries category="cat3name">
will do it automaticaly on the monthly index page?

If that is what you mean than This way is even better - I can put that in a table with 2 columns!
(that was supposed to be my next question)
girlie
The ... represents whatever MTEntry* tags you want to use to display information about those entries in the list.

Like, everything you're already using between your existing MTEntries tags.
fresco
On the second thought why cant I do as you thought of
CODE
<MTEntries sort_by="category" >
...
</MTEntries>


or

CODE
<MTEntries category="<$MTArchiveCategory$>" >
...
</MTEntries>
fresco
a... I think I am getting it - it has to go inside a container tag to repeat itself for all entries. But it can go inside of only one cont tag - ether Date Based or Cat Based?
Am I right?

Is it possible to create MTEntriesCat tag and MTEntryDate tag so they can go inside MTCAtegories or MTEntry tags?

So we will have two options to sort - it repeats itself for as many times as there are categories, but pulls entries from date_monthly list?

CODE
<MTCategories>
  <MTEntriesDate>

       .....
  </MTEntriesDate>
</MTCategories>


am I making sence?
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.