Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-01-27 18:00:17

adrianus
New Member
Registered: 2010-01-27
Posts: 2

(ask) Sorting Archive Page by category and date

I want to set up an archive page which can be sorted either by date or category.

My basic logic works like this :

1. Create a section for Archive with date sorting as a default (let say a section called “by_date” and give a section Title “Archive”), and
2. Create another section (called “by_category”)

So the code would be like this:

<txp:if_section name=“by_date”>
<p> Sort by: Dates | <a href=”/by_category/”>category</a>

….
</txp:if_section>

the problem is, if I go this way the “by_category” section will show up on my menu bar, which I dont want to. Is there any other way to achieve this?

thanks before

Offline

#2 2010-01-27 18:38:21

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: (ask) Sorting Archive Page by category and date

Any number of ways to skin that cat, but if your only issue with your current solution is excluding a section from your menu bar, note that the section_list tag takes an exclude attribute.


Code is topiary

Offline

#3 2010-01-28 06:16:12

adrianus
New Member
Registered: 2010-01-27
Posts: 2

Re: (ask) Sorting Archive Page by category and date

wow..it’s really simple things… thanks a lot jsoo

Offline

Board footer

Powered by FluxBB