Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-18 18:43:41

js
New Member
Registered: 2005-07-05
Posts: 7

Create a site w many subjects and a clean/easy url to each subject?

Looking for some advice from some people a bit more experienced with TXP than I am.

What might be the best way to set up a website that is going to have a lot (150+) different specific subjects (actually geographic locations). Each location includes some links that are generic (national) some links will be shared (the locations are in the same state or city) and some links will be individual to the geographic location. There will also be some pages that will be generic / common to all as well as some that will be shared among several and some that will be location specific.

Each location / subject is too have a url that is easy to type / not messy that can get someone directly to information on that subject / location. (Perhaps www.sitename.org/location1name.) Ideally site would remember what location / section that the person entered the site on and would have a link to that location (location homepage as it were) and have a link to that near the top of a page. Next to that could be a dropdown, or some mechanism offering people to select another location if it was incorrect or if they wanted to look at the information for any of the other locations.

I’m open to suggestions as to the best way to do that. So far what I was thinking was to have each individual location have be a section. Could have a listing of links that are generic (apply to all), another listing of state / regional links (using an if condition) and another listing of location specific links (using an if condition). Articles that apply to all of the locations would be in another section by themselves and there would be a link to them from the menu. How would I have a link back to the url/section that they entered on? Or should I be looking at utilizing categories, and if so how could I have a clean url that people could use to go directly to the “home page” for the location they are looking at? Are redirects necessary?

Any suggestions are welcome and much appreciated.

Offline

#2 2006-07-18 19:33:08

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,126
Website GitHub

Re: Create a site w many subjects and a clean/easy url to each subject?

I think you’ve got the right idea with sections for the locations.

If it was only a linklist per location (i.e. no articles under the location) you could have used an article per location and output link lists within each.

For the link lists you might be better off using link-categories (careful: not the same as article categories) and outputting a linklist of the general link-category and then a linklist of the regional link-category. If you match link categories with section names you might be able output the current section name directly into the regional link list tag (will require nesting tags but possible – see the FAQ).

Entry page: you could save a cookie on the user’s computer when they enter the site, then detect if the cookie is active when they arrive again (detect before you set) and then if_different from current location then redirect (or notify “you last used our site with “mylastlocation” (linked) as this location…) based on this if they enter the site elsewhere. A section drop-down would work to change the user’s base location. There’s a plug-in called chs_cookie for basic cookie handling.

One last parting thought, you might also want to investigate one of the faux_url or url_handler plug-ins to try and achieve section/category urls. Categories can have parents and children, which makes sense for regions and locations within regions.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB