Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-01-12 17:39:11

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

What I’d really like to do is produce a Nested List so I can collapse it.

UPDATE Looks like it’s not possible… Poop! See this post.

Something like:

<code>
<ul class=“Archive”>
<li>2004
<ul>
<li>January
<ul>
<li><a href=”#”>Article 1</a></li>
</ul>
</li>
<li>February
<ul>
<li><a href=”#”>Article 1</a></li>
</ul>
</li>
</ul>
</li>
<li>2005
<ul>
<li>January
<ul>
<li><a href=”#”>Article 1</a></li>
</ul>
</li>
<li>February
<ul>
<li><a href=”#”>Article 1</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</code>

Is this possible? trying out loud…
I’ll post what I find out.

Last edited by mrdale (2006-01-12 18:44:19)

Offline

#26 2006-01-12 21:31:14

mikeg
Member
From: Edmonton, Canada.
Registered: 2005-02-21
Posts: 31
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

Just thought I’d pass this on for information. I came up with this solution. I wanted Header tags for the year and month with the individual days as list items in a properly marked-up list. Here is what I did:

In the “archive” page template:

<ul style="display: none;">
<li style="display: none;"></li>
<txp:article_custom limit=99999 form="monthly_article" section="article" /> </ul>

<p>This creates a dummy <ul> at the beginning of the list, but it won’t break your validation, if you care enough, that is. Otherwise, you could just omit the dummy <ul> and <li></li> that I have shown here.</p>

<p>And in the monthly_article form:</p>

<txp:if_different>
</ul>
<h2><txp:posted format="%Y" /></h2>
</txp:if_different>
<txp:if_different>
<h3><txp:posted format="%B" /></h3>
<ul class="archive_list">
</txp:if_different>
<li><txp:posted format="%d" /> - <a href="<txp:permlink />" title="Permanent link to ' <txp:title /> '"><txp:title /></a></li>

<p>That’s it. Hope it helps someone…</p>

Last edited by mikeg (2006-01-12 21:34:39)


“I love Beethoven. Especially the poems.”
- Ringo Starr

Offline

#27 2006-01-18 23:24:23

pericat
Archived Plugin Author
From: Vancouver, BC
Registered: 2006-01-12
Posts: 4
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

It certainly helped me. Thanks!

Offline

#28 2006-01-24 17:13:19

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

OK This is wierd… I’ve used the archive technique to great effect, but… I notice that when a page is arrived at via a calendar(mdp_calendar) and has a date based url, thearchive will obly display the articles for that day in the archive.

Any thoughts?

Offline

#29 2006-03-18 02:37:22

Nell
Member
From: Mexico City, Mexico
Registered: 2005-06-21
Posts: 48

Re: Archive lists by month (section, category, etc) with 4.0.2

I did it this way with a definition list. This makes the date headers and each post a list item, with no empty <code>ul</code>s.

<code>
<txp:if_different>
<dt><txp:posted format=”%B %Y” /></dt>
</txp:if_different>
<dd><txp:permlink><txp:title /></txp:permlink></dd>
</code>

Last edited by Nell (2006-03-18 02:38:49)

Offline

#30 2006-04-08 08:33:57

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Archive lists by month (section, category, etc) with 4.0.2

I read some bit confusing threads here. But the thing is that I´d still need to make monthly archives for a client in a way that archives are presented as a article list. So when you are on the blog section of the site, in the sidebar there is Archives listed by january, february etc. and clicking a month takes you to listing where all the posts are presented from the whole month. Not just the post titles with a link to the actual post but a full article list.

Yes, talking here about movable type archives handling. In generally I use Stuarts exellent solution making archive page summary and with rss_superachive I can make month listing. But with it I can not list the whole posts, only the post titles. Or can I?

Offline

#31 2006-04-08 14:19:40

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

Do you mean my solution or with the plug-in P ? With the plug-in you can use showexcerpt=”1” to display an article’s excerpt assuming it has one.

Last edited by thebombsite (2006-04-08 14:29:40)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#32 2006-04-08 14:54:31

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Archive lists by month (section, category, etc) with 4.0.2

The site in question is an existing site that I´m converting to TXP. Well actually two sites, one made with html and other, blog, running with Movable. None of the blog posts use excerpts and I doubt they are willing to start using them even now.

Personally I prefer your way of archiving but for the client I´d also need to have list of months that have blog posts in the sidebar so by clicking selected month link takes you to page listing the whole entrys from chosen month. This is what they are used to have and are willing to maintain.

So… I don´t know what I mean, I know just that I´d like to be able to do this somehow :D

Offline

#33 2006-04-08 15:58:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

Confusion reigns. ;)

If you were using my version you could simply add <code><txp:body /></code> under the “Title” tag in the FORM template.

For the plug-in you could use the showexcerpt=”1” attribute then hack the plug-in to pick up $body instead of $excerpt.

If you decide which way you want to go I can give more detailed help. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#34 2006-04-08 16:19:47

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Archive lists by month (section, category, etc) with 4.0.2

:D

Can I pull links from your solution and add them to the sidebar? So when clicking “November” it shows only blog posts from november etc.?

If not, then I assume I´d have to use plugin.

Offline

#35 2006-04-08 16:32:22

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

First thing to mention is that I’m trying to develop a form specifically for your sidebar here. You can watch it as I do it if you like.

Second point to mention is that with my method, the actual archive page itself will be a full archive however, with the built-in “Back to the Top” links and the menu at the top, it is quite easy to get around even though it will probably be a very long single page.

I now need to sort out the links for the sidebar menu so that they take you straight to the month you are looking for. :(

Last edited by thebombsite (2007-01-27 23:07:42)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#36 2006-04-08 16:49:50

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Archive lists by month (section, category, etc) with 4.0.2

How’s that then? Would that suit your purpose?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB