Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-27 12:37:53

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

Archive: Which plugin should I use?

I know there are a lot of plugins out there to use for an archive, but I don’t know which one I should use for the approach I want:

On the indexpage of my “blog”-section, I want a list that displays a list of months since the beginning of my blog.
This would look like this:

  • December 2007
  • November 2007
  • October 2007
  • September 2007

When I click on one of these months, I would like a page like you get when you click on a category.
Any options?


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

#2 2007-12-27 16:17:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Archive: Which plugin should I use?

This one or maybe this one?

Offline

#3 2007-12-27 16:27:40

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Archive: Which plugin should I use?

Or you can experiment and do it without plugins


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2007-12-27 16:31:38

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

Re: Archive: Which plugin should I use?

colak wrote:

Or you can experiment and do it without plugins

Well, I’ve used this technique before, but now I need a page where I can display all the articles posted in a certain month…


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

#5 2007-12-27 17:08:56

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Archive: Which plugin should I use?

Well, I’ve used this technique before, but now I need a page where I can display all the articles posted in a certain month…

Haven’t you noticed that both txp:article and txp:article_custom suport this?

In example: http://www.mydomain.com/blog/2007/12 would show only posts in this month…

To make this as changeful list why not make the links at sitebar to do something like:

In template:

<ul>
<txp:article_custom sort="Posted DESC" limit="9999" form="my-month-links" section="blog" />
</ul>

In article form called my-month-links:

<txp:if_different><a href="<txp:site_url />blog/<txp:posted format="%Y/%m" />"><txp:posted format="%B %Y" /></a></txp:if_different>

Cheers!

Offline

#6 2007-12-27 17:11:37

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

Re: Archive: Which plugin should I use?

@Gocom

Yes, that looks nice and simple, but I’m using /section/title for permanent links, and would rather not change this…


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

#7 2007-12-27 17:16:04

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Archive: Which plugin should I use?

Yes, that looks nice and simple, but I’m using /section/title for permanent links, and would rather not change this…

Yeah, that thing. But you could use a little php, as I did with my blog:

Monthly link: http://www.mydomain.com/blog/?y=2007&m=12

And the code to optain the list:

<txp:php>
	if(gps('y') && gps('m')) {
		echo article_custom(array(
			'sort' 		=> 'Posted desc',
			'limit' 	=> '9999',
			'month' 	=> (gps('y') && gps('m')) ? gps('y').'-'.gps('m') : '',
			'form' 		=> 'default',
			'section'	=> section(),
		));
	}
</txp:php>

Used in example at http://www.rahinaa.biz/lehti/?vuosi=2007&kuukausi=12 (changed the gps-function names and added little extra code)

Cheers!

Last edited by Gocom (2007-12-27 17:25:17)

Offline

#8 2007-12-27 22:58:17

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

Re: Archive: Which plugin should I use?

@Gocom: I appreciate the effort you’re doing here! But the main reason I learned Textpattern, is that I can’t write a single line of php or any other programming language…

I’m embarrassed to ask, but is it possible to write a short how-to? Sorry…


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

#9 2007-12-27 23:39:17

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Archive: Which plugin should I use?

maxvoltar wrote:

@Gocom: I appreciate the effort you’re doing here! But the main reason I learned Textpattern, is that I can’t write a single line of php or any other programming language…

Neither can most of us :) Why don’t you go for one of the plugins mentioned? I’m sure rss_suparchive can do it without a problem.

Offline

#10 2007-12-27 23:42:49

maxvoltar
Member
From: Machelen, Belgium
Registered: 2007-08-16
Posts: 76
Website

Re: Archive: Which plugin should I use?

Els wrote:

Neither can most of us :) Why don’t you go for one of the plugins mentioned? I’m sure rss_suparchive can do it without a problem.

I’ll try wrapping my head around it once more :-)


Textpattern projects: Maxvoltar, Made by Elephant, Twunch

Offline

#11 2007-12-28 00:45:07

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Archive: Which plugin should I use?

Gocom

Wow, that’s simple but brilliant, thank you!

Offline

#12 2008-01-13 17:59:18

jodeci
Member
From: Taipei
Registered: 2008-01-13
Posts: 38
Website

Re: Archive: Which plugin should I use?

maxvoltar wrote:

On the indexpage of my “blog”-section, I want a list that displays a list of months since the beginning of my blog.
This would look like this:

  • December 2007
  • November 2007
  • October 2007
  • September 2007

Hi, I’m really new to textpattern and trying to do the same thing. So far I’m quite impressed — much faster than MT, much easier than WP :)

colak wrote:

Or you can experiment and do it without plugins

Not wanting to jump into plugins too soon, I tried the above technique (Michael’s take at #4), and I’m obviously doing something wrong, because nothing is showing up.

Following instructions, I first created an article form “monthly_menu” with the following code:

<li><a href=”<txp:siteurl />archives/<txp:posted format=”#a%m%y” />”><txp:posted format=”%B %Y” /></a></li>

Then, I added this code in a misc form “colophon”:

<div class="archive">
<h4>archives</h4>
<ul>
<txp:article_custom limit=“99999” form=“monthly_menu” />
</ul>
</div>

“colophon” was then called into the “default” page template:

<txp:output_form form="colophon" />

However, “monthly_menu” does not show up. The HTML output I get is:

<div class="archive">
<h4>archives</h4>
<ul>
</ul>
</div>

I must be missing something very obvious here. I’d appreciate if someone could point it out, thanks in advance :)

Offline

Board footer

Powered by FluxBB