Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-21 00:30:29

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Third URL segment in Textpattern

I am building a website for an art exhibition. All the artists are listed under /deelnemers/ while the specifics are listed under /deelnemers/artist-name/ .

My problem is that I would like to create a seperate photo-page with this url structure /deelnemers/artist-name/fotos/
At the moment this only calls up the same page as /deelnemers/artist-name/ . Is it possible to serve up different content by means of some magical txp:if statement that I do not know about?

Offline

#2 2008-01-21 00:32:54

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Third URL segment in Textpattern

Textpattern doesn’t support sub-sections natively.

Offline

#3 2008-01-21 00:34:42

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Third URL segment in Textpattern

Natively? Does that mean that there is a plugin floating about? Thanks for the quick response.

Offline

#4 2008-01-21 00:41:59

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Third URL segment in Textpattern


⌃ ⇧ < ⌃ ⇧ >

Offline

#5 2008-01-21 03:02:43

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Third URL segment in Textpattern

Thanks for the tip about this plugin. Unfortunately, I cannot seem to figure out how it works… or at least I cannot get it to work.

I created a rule for section/title/fotos/ which is then remapped to a new section that I created called deelnemer_fotos. Right now I see that page when I try to access /deelnemers/, which is not what I want…
/deelnemers/artist-name/fotos/ would need to be remapped to /deelnemer_fotos/artist-name/ for this too work. Any suggestions?

P.S.: I am thinking that a bit of .htaccess could achieve the same thing. Unfortunately I do not know how to write it in such a way that it doesn’t mess up the bit that Textpattern needs to get rid of the index.php

Right now I tried this out… yet that does absolutely nothing:

# DirectoryIndex index.php index.html
# Options +FollowSymLinks
# RewriteBase /

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^(.+) - [PT,L]
 RewriteRule ^(.*) index.php
 RewriteRule ^/deelnemers/(.*)/fotos/$ /deelnemer_fotos/$1 [L]
</IfModule>

Last edited by dl33 (2008-01-21 03:38:26)

Offline

#6 2008-01-21 08:00:47

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: Third URL segment in Textpattern

you could simply stick to a /section/category/title scheme to organize your content. utilize gbp_permanent_links then to end up with nice URLs that reflect that structure.
in your specific case deelnemers is a section. for each artist, you can then create a category. that way you can attach multiple articles to every artist, one being an article titled fotos, that contains all the photos (for example in the article image field). it’s really simple and easily manageable. i’ve built a site for a gallery last year which pretty much follows the same structure. (see here)

Last edited by sthmtc (2008-01-21 08:01:41)

Offline

#7 2008-01-24 23:47:25

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Third URL segment in Textpattern

Thanks for the tip kappa, however, I am wondering whether there isn’t a simpler method. If would keep the site up to date it wouldn’t be a problem, unfortunately i am not. There will be a group of five people updating the site, most of which will have trouble with a separate image uploading tab. (I know this from experience.)
Is there any way to implement my third url segment? (I am willing to use a whole load of custom fields for my images as long as everything is united.)

Offline

#8 2008-01-25 00:47:43

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Third URL segment in Textpattern

Mary wrote:

Textpattern doesn’t support sub-sections natively.

dl33 wrote:

Natively? Does that mean that there is a plugin floating about?

Does cnk_section_tree still work/fit your needs?

Offline

#9 2008-01-25 18:05:57

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Third URL segment in Textpattern

Thanks for the plugin, maverick, but I am afraid that it won’t help me. I am trying to create something exactly like sthmtc described it: A separate photo page for an artist showcase site. However, I do not want to use categories as it complicates maintenance too much for the final users…

Offline

#10 2008-01-25 19:06:58

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: Third URL segment in Textpattern

dl33 wrote:

Thanks for the plugin, maverick, but I am afraid that it won’t help me. I am trying to create something exactly like sthmtc described it: A separate photo page for an artist showcase site. However, I do not want to use categories as it complicates maintenance too much for the final users…

of course it’s totally up to you, but i find my solution rather obvious, very streamlined and the client never had a problem with it after a really brief introduction i gave them…

Offline

#11 2008-01-26 17:04:32

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Third URL segment in Textpattern

All right, I might just give this a try. Sthmtc, I still got a question though? If I have different categories for each artist, can each category contain an article with the same name (url name). If I have to start working with fotos_1, fotos_2, etc., it will be a mess.

Offline

Board footer

Powered by FluxBB