Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-10-12 15:23:02

mistersugar
Member
From: North Carolina
Registered: 2004-04-13
Posts: 118
Website

What's best way to create a menu of archives links?

On the bottom of his home page, http://dashes.com/anil/, Anil Dash has a menu of his archives. I also have 11 years of blogging, and I’d like to create a similar menu of my year/month archives.

I’ve started to work with the upm_date_archive plugin, but I’m not sure that will allow such a table.

Suggestions?

Offline

#2 2012-10-12 21:38:59

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: What's best way to create a menu of archives links?

The upm_date_menu tag output is a definition list, like this:

<dl>
<dt>2011</dt>
	<dd>Jan</dd>
	<dd>Feb</dd>
	<dd>Mar</dd>
	<dd>Apr</dd>
	<dd>May</dd>
	<dd>Jun</dd>
	<dd>Jul</dd>
	<dd>Aug</dd>
	<dd>Sep</dd>
	<dd>Oct</dd>
	<dd>Nov</dd>
	<dd>Dec</dd>
<dt>2012</dt>
	<dd>Jan</dd>
	<dd>Feb</dd>
	<dd>Mar</dd>
	<dd>Apr</dd>
	<dd>May</dd>
	<dd>Jun</dd>
	<dd>Jul</dd>
	<dd>Aug</dd>
	<dd>Sep</dd>
	<dd>Oct</dd>
	<dd>Nov</dd>
	<dd>Dec</dd></dl>

So I think it wouldn’t be too hard to style it like a “table” like this:

2011 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2012 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

My knowledge of CSS is not enough though to know if there is a way to make these ‘rows’ display as ‘columns’.

Offline

#3 2012-10-13 15:09:45

etc
Developer
Registered: 2010-11-11
Posts: 3,203
Website

Re: What's best way to create a menu of archives links?

With CSS3 box-orient this should be possible, but it is not yet supported by all browsers. Otherwise, you could transform the DOM tree with etc_query, see here.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#4 2012-10-13 15:20:50

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: What's best way to create a menu of archives links?

etc wrote:

Otherwise, you could transform the DOM tree with etc_query, see here.

Wow, great! I hadn’t realised etc_query would make it that simple.

Offline

#5 2012-10-13 15:26:52

etc
Developer
Registered: 2010-11-11
Posts: 3,203
Website

Re: What's best way to create a menu of archives links?

Thanks, Els! I guess the etc_query help needs some update.


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB