Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-07-22 02:30:50
- brunodario
- Member
- From: Belo Horizonte, Brasil
- Registered: 2007-09-19
- Posts: 75
Structure this site with Txp? Subsections?
Hey there TXP community!
I´ve done many txp-driven websites in the past year but now i´m dealing with a structure that “checked” my knowlege…
The client is a student exchange company and there´s one section in this website that is really tricky to accomplish:
I´ve got home > trips >> name of the trip (this is a restricted section, but no problem with this)
And that would be the “logical” strutcure of textpattern (section/article).
However, inside of “name of the trip” there´s a sub-menu with a lot of sub divided information such as:
- Program
- Taxes
- Photo Gallery
- Bus
- Prices
- Parent authorization
- General Conditions
And more…
So i need an structure like this:
home/trips/name of the trip/program
home/trips/name of the trip/taxes
home/trips/name of the trip/photo gallery
etc
You can check a mockup simulating the “program” menu opened at http://www.martuse.com/jobs/belobrasil/index_teste-5.html The layout is on portuguese, but it´s pretty clear)
I´m thinking 3 ways of doing it:
One txp install inside the “trips” folder (what do you think?)
Use categories (Don´t know exactly how…)
Use javascript + ajax to load content posted on hidden sections (program, taxes, photo gallery, prices would be all sections, sound very tricky)
That´s it, any thoughts?
Thx in advance!
Last edited by brunodario (2010-07-22 02:32:33)
Offline
Re: Structure this site with Txp? Subsections?
gbp_permanent_links will save you a lot of hassle and will create the fake structure for you, given your rules.
If you want to do it yourself though you can cheat. TXP doesn’t ‘understand’ anything after the /article
(in section/title permlink mode). So you can pretty much construct your own URLs and put whatever you like there.
You then have a few avenues open:
- construct the URLs as you want your visitors to see them and then look at PHP’s
$_SERVER['REQUEST_URI']
variable, split it up at the forward slash and grab the third entry which will be your fake directory name - construct your URLs in your code as
home/trips/name of the trip?program
orhome/trips/name of the trip?photo gallery=1
and use the adi_gps plugin (or smd_if or even smd_query) to grab the value from the URL and act accordingly. Then use an .htaccess rule to make the URL more pretty
But I’d try gbp_permanent_links first. It’s awesome.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2010-07-22 10:18:56
- brunodario
- Member
- From: Belo Horizonte, Brasil
- Registered: 2007-09-19
- Posts: 75
Re: Structure this site with Txp? Subsections?
Your answer is pure gold Bloke, gbp_permanent_links looks exactly what i need for this.
Thx
Offline