Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-27 23:40:21

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

A section list populated by years?

I’ve got this in my navigation menu:

<txp:section_list class=“navlinks” this_section=“1” type=“article” wraptag=“p” />

It produces:

Article
Feature Stories
Press Releases

Is there a command/tag I can use that will populate year links for years with press releases in them?

Thanks,
Matt

Offline

#2 2007-03-01 19:25:02

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

Re: A section list populated by years?

I’m not entirely sure what you are after but maybe using the “if_different” tag might be what you are looking for.

I have an article describing it’s use for extracting articles by “year”. There is a second article showing how to create a linking sidebar menu.

Hope that helps.


Stuart

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

Offline

#3 2007-03-05 23:32:39

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

Re: A section list populated by years?

While your article is extremely informative, what I’m looking for is far more simple than that:

http://scriptcover.com/press-releases/2007/molly-ivins-62-columnist-and-raconteur.html

Basically, I’d like the the years in the navigation (1998-2007) to link to Archive links for that year. The bottom link (“2007 Archive”) does this in a way but I’m afraid that the same set up wouldn’t work within archive pages because it relies on relative links. Any advice?

Thanks!
Matt

Offline

#4 2007-03-06 00:16:30

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

Re: A section list populated by years?

does this help?

Offline

#5 2007-03-07 23:23:58

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

Re: A section list populated by years?

mrdale wrote:

does this help?

Kind of. But all I need for the sidebar is the year, not the months or the days. Can it be simplified to do so? I’m playing with it now.

Edit: Scratch the above; do you know how to make the monthly archive look like the one on this page?

http://www.jameslomax.com/photos/2005-10

Last edited by Transmodiar (2007-03-08 00:29:06)

Offline

#6 2007-03-08 01:01:25

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: A section list populated by years?

CSS. Specifically, display: inline;. Take a look at his and you’ll see how it’s done.

Offline

#7 2007-03-08 20:22:19

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

Re: A section list populated by years?

That worked great! One more question – is there a way to do a <txp:article> list that will only show on this page:

http://scriptcover.com/press-releases

I used an <if_section> tag to bring it up but the text describing the archive remains when I click on one of the months. Any way to disable that text?

Thanks!

Offline

#8 2007-03-11 10:46:22

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: A section list populated by years?

I can’t see/understand what you’re referring to?

Offline

#9 2007-03-12 16:47:11

Transmodiar
Member
Registered: 2007-02-22
Posts: 17

Re: A section list populated by years?

Mary wrote:

I can’t see/understand what you’re referring to?

Sorry, I disabled that over the weekend, please take a look now:

http://scriptcover.com/press-releases

Clicking on one of the links generated by your plugin will show what I’m referring about. For reference, here is the code I have on the PR page:

<txp:if_section name=“press-releases”>
<h3>Press Release Archive</h3>

<txp:article allowoverride=“0” form=“archive” limit=“50” pageby=“50” pgonly=“0” searchall=“0” searchsticky=“0” sort=“Posted desc” status=“4” />

<p align=“center”><txp:older showalways=“1”><txp:text item=“Older Press Releases” /></txp:older> &middot; <txp:newer showalways=“1”><txp:text item=“Newer Press Releases” /></txp:newer></p>

<p>&nbsp;</p>
</txp:if_section>

Offline

#10 2007-03-13 17:19:16

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: A section list populated by years?

Ah, okay.

I think you could use the chs_if_urlvar plugin to only show that stuff when you want it to; my plugin populates the month variable (it still does this – in a “hidden” way – when clean urls are used).

Offline

Board footer

Powered by FluxBB