Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-23 23:09:52

sugoo
Member
Registered: 2006-05-29
Posts: 20

web site navigation question

I’m working on a site (http://www.crawfordstrategies.com/newsite/) with content arranged hierarchically as follows:

section
category
subcategory

Each section has a front (sticky) page that’s displayed when the user clicks on the section name in the main navigation bar (generated using <txp:section_list />). Some sections contain more than one article, so I’ve created a corresponding category for each of those sections, then if necessary, one or more subcategories therein. Now, all I need is a way to generate a hierarchical menu of the articles in each category/subcategory. I wanted to use the <txp:article_custom /> tag, but I couldn’t figure out a way to make that listing include my subcategories. After many unsuccessful tries with different plugins and txp tags, I finally installed the wow_menu plugin, and got the listing of categories/subcategories I wanted to display on the page in a hierarchical style, but it’s still not what I need.

If you look at http://www.crawfordstrategies.com/newsite/services/, you can see where I’m stuck. Each of the items in the bulleted list in the right-hand column should be pointing to an article, but instead it’s pointing to a page that doesn’t exist. I think this is because the plugin is generating a category list instead of an article list, but I just can’t figure out how to get from where I am to where I want to be. Thanks in advance to anyone who can offer me any help with this.

Offline

#2 2007-02-23 23:16:41

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

Re: web site navigation question

stw_category_tree is a feature rich category lister that outputs subcategories.

Ok, so you have to have an <txp:article/> tag somewhere on the page, that will display articles based on your sections and categories. <txp:article_custom/> is not contextual ie. It restricts to the sections and categories you specify through attributes.

So if your section page includes a <txp:article limit="1"/>. When you are on the following pages, you’ll get the following articles…

  1. http://tld.com/Services => The latest “live” article from the services section.
  2. http://tld.com/Services/Category => The latest “live” article from the services section that matches “Category”.
  3. http://tld.com/Services/SubCategory => The latest “live” article from the services section that matches “subCategory”.

If you want a static articles to appear on your top level section page only, you could publish those articles with a status of “sticky” then wrap your article forms in conditional that selects for the existence (or not) of a category

bc..
<txp:if_category>
<txp:article status=“live” limit=“1”/>
<txp:else/>
<txp:article status=“sticky” limit=“1”/>
</txp:if_category>

Last edited by mrdale (2007-02-23 23:31:03)

Offline

#3 2007-02-23 23:24:19

sugoo
Member
Registered: 2006-05-29
Posts: 20

Re: web site navigation question

thanks! that is one of the plugins I tried (it’s active now), but I couldn’t get the url handling to work… maybe I should just go over to that forum and post questions about that particular plugin there. Thanks again.

Offline

#4 2007-02-23 23:34:19

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

Re: web site navigation question

OK, If you want to use a clean_url scheme like section/category/subCategory you should check out sgb_url_handler or gpb_permanent_links

Offline

#5 2007-02-23 23:35:04

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

Re: web site navigation question

Oh, and notice I gave you a more detailed answer in #2

Offline

Board footer

Powered by FluxBB