Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-05 23:32:36

marana
New Member
From: Southern Arizona
Registered: 2008-04-05
Posts: 5

Click Events involving Category Lists

Hi, everyone. I am a newbie in the process of building my first TXP website. The site is for a business group that meets regularly to share business leads. Membership in the group is limited to one person per industry.

On the site, each person has their own TXP Article containing a photo, bio and contact information. Each article is associated with one-and-only-one Category (the industry represented). The Site displays a list of Categories in the sidebar that, when clicked, produces a single-item list (the Member’s name). When the name is clicked, the system then presents a default page showing the Person’s bio and photo.

What I am trying to do is skip over the step involving the single-item list and move directly to the default page where the person’s bio and photo are displayed. I have been unsuccessful, however, in finding ANY documentation that reveals what Page or Form is called when the Category List is clicked. If I knew which page was being called, I might be able to fix the problem. Any ideas?

Offline

#2 2008-04-06 08:59:19

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Click Events involving Category Lists

Welcome marana,

The category list produces a link ?c=categoryname that you will see in the address bar, sometimes with the respective section preprended if you have the section="..." attribute set in txp:category_list. It will be displayed using the page template of that section (or page template from default section if none is selected). You can determine how the category is displayed in that template. For instance to show the first article in full for categories set up an txp:if_category section in your page template and use txp:article listform="form-that-displays-entire-post" (and limit="1" when there is only one representative per industry). Your address bar will then show mydomain.tld/?c=manufacturing and display the first article in the category (and section) in full.

The other approach is to not build your link using category_list. For instance if your personal biographies are all in a section called “representatives”, then use txp:article_custom section="representatives" form="my-link-list-form" to create a link list that links directly to the person. In your form you can output the category of the article rather than the title of the article (name of the person) if your list is supposed to show only the industries. Your address bar will then show mydomain.tld/representatives/joe-bloggs.

Last edited by jakob (2008-04-06 08:59:42)


TXP Builders – finely-crafted code, design and txp

Offline

#3 2008-04-06 12:29:02

marana
New Member
From: Southern Arizona
Registered: 2008-04-05
Posts: 5

Re: Click Events involving Category Lists

Thanks, jakob. The alternatives you proposed were very well written and very helpful. I appreciate your clarity and suppport.

Offline

Board footer

Powered by FluxBB