Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-01 21:27:03

jag
Member
Registered: 2006-07-01
Posts: 10

static page in section or subsection

Hi,

Please forgive me if I have not understood so far the different posts that cover similar questions, but here goes…

I would like to obtain :

http://www.domain.com/photos/professional.html

I have been able to configure :
http://www.domain.com/photos/ with a section called photos (shows I’m not so bad ;) )

but I can’t understand how to obtain the above.

I would also like to be able to this if the above is not possible : http://www.domain.com/photos/professional/

But I came across several developper posts about this but none seemed to provide a solution to either of the above, but then that may say more about me :(

Thanks for any help with this

John

Offline

#2 2006-07-01 22:37:02

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: static page in section or subsection

What is ‘professional’ in your install, an article or a category?

Offline

#3 2006-07-01 22:59:19

jag
Member
Registered: 2006-07-01
Posts: 10

Re: static page in section or subsection

I think I understand why you ask. I would like to have the following structure to my site, using both blog and CMS functions that textpattern offers :

a) Home
b) > Photos (this would be a section)
c) > Photos > Professional (this would be a section within a section or page within a section)
d) > Photos > Travel (this would be a section within a section or page within a section)
e) > Article (this would be where the blog articles would be published
f) >Contact (this would be a section)
g) >About (this would be a section)

URLs could be like this :

a) http://www.domain.com
b) http://www.domain.com/photos/
c) http://www.domain.com/photos/professional or http://www.domain.com/photos/professional.html
d) http://www.domain.com/photos/travel
e) http://www.domain.com/article/
f) http://www.domain.com/contact/
g) http://www.domain.com/about/

In case c) I’m guessing I can use a mod_rewrite rule to mask the php

In case e) I would have say :
http://www.domain.com/article/article_name_1
http://www.domain.com/article/article_name_2
etc.

I’m new to textpattern and have only really used others code in PHP. I’m not sure whether textpattern can do this type of structure but I hope you can see how I want to use it as a CMS as per example b), c) and d) whereas example e) would be using the ‘blog with articles’ type approach…

Thanks,

John

Offline

#4 2006-07-02 11:06:28

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: static page in section or subsection

If I were you I’d make ‘travel’ and ‘professional’ categories. URL would be /photos/?c=professional then. Would that be acceptable? It’s the easiest way to do it.
If not, there is a plugin that will let you have different url schemes. And another one.

You could make ‘travel’ and ‘professional’ articles (url: /photos/professional) but if you are going to add content on a regular basis, the articles will become really long and editing them will become harder.

Offline

#5 2006-07-02 21:42:37

jag
Member
Registered: 2006-07-01
Posts: 10

Re: static page in section or subsection

Hi Els,

Thanks ever so much for taking the time to look over my questions and furthermore find some great solutions that I will be looking into straight away. I’ll post back to explain which one I used and why but as the about text on the gbp_faux_static plugin explains it can even handle the “.html” part, I think I’ll be trying that out. I like that since I am also moving from an existing structure that I have redesigned and updated.

Thanks again,

John

Offline

#6 2006-07-02 22:16:03

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: static page in section or subsection

You’re welcome. Let us know where you end up ;)

Offline

#7 2006-07-03 19:04:38

jag
Member
Registered: 2006-07-01
Posts: 10

Re: static page in section or subsection

Hi

I am having difficulties getting it to work but, as per your question above, I think it may be to do with the way that I am creating the ‘content’.

If I take the example of ‘professional photos’ :

<ul><li>I didn’t understand what you meant by categories but figured that out afterwards, I think that you were suggesting that the ‘professional photos’ page be added as an article in a category called ‘photos’ ?</li>

<li> I had however thought of creating a section called ‘photos_professional’ and then have the url forwarding plugin do a mod_rewrite so that it pointed to :
http://www.domain.com/photos/professional_photos.html</li></ul>

My reason for ‘not’ doing it in an article is the specific format/code used in the page. The issue I have is, that this page requires JavaScript to run the slideshow, since it is associated to a music festival and I’d rather use CSS to associate, via external JavaScript, sounds to specific images in the slideshow rather than do it in Flash. The page is then clean of repeated JavaScript code and just uses a CSS class to launch the appropriate JavaScript code.

Before going into why I can’t get the plug-in to work I was wondering whether you thought that my approach was valid under the circumstances or not…?

Thanks

John

Last edited by jag (2006-07-03 19:19:01)

Offline

#8 2006-07-03 20:31:55

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: static page in section or subsection

jag wrote:

I didn’t understand what you meant by categories but figured that out afterwards, I think that you were suggesting that the ‘professional photos’ page be added as an article in a category called ‘photos’?

Actually I meant a section ‘photos’ and a category ‘professional’, so you could post each photo as an article in that section and category, but…

I had however thought of creating a section called ‘photos_professional’ and then have the url forwarding plugin do a mod_rewrite so that it pointed to :
http://www.domain.com/photos/professional_photos.html

…if you are going to rewrite the url’s you can do anything that suits you best, as far as I can see.

My reason for ‘not’ doing it in an article is the specific format/code used in the page. The issue I have is, that this page requires JavaScript to run the slideshow, since it is associated to a music festival and I’d rather use CSS to associate, via external JavaScript, sounds to specific images in the slideshow rather than do it in Flash. The page is then clean of repeated JavaScript code and just uses a CSS class to launch the appropriate JavaScript code.

Before going into why I can’t get the plug-in to work I was wondering whether you thought that my approach was valid under the circumstances or not…?

I don’t know much about scripts and what conditions they require. But I’m sure others here do, and no doubt someone else will answer your question soon ;)

Last edited by els (2006-07-03 20:33:18)

Offline

#9 2006-07-03 20:40:55

jag
Member
Registered: 2006-07-01
Posts: 10

Re: static page in section or subsection

Els wrote:

Actually I meant a section ‘photos’ and a category ‘professional’, so you could post each photo as an article in that section and category, but…

I think this is were I’m loosing the thread of things. When I create a section I don’t see/understand how to add a category to it ! Sorry if this sounds silly but I haven’t got ‘it’ yet !

My understanding is a page/content can be either added as a ‘page’ in “presentation > pages” or as an article in “content > write” and I’m missing how to create content as a ‘category’. I thought category was like a tag for tagging either pages or articles…

John

Offline

#10 2006-07-03 20:47:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: static page in section or subsection

You’re right, John, you don’t ‘add’ categories to sections. But you can make it look that way by calling a category page on it’s own section page (you would have to handcode the links though, <txp:category_list /> will use the default page). Link would be site.com/photos/?c=professional, which would display a list of articles in section ‘photos’ that have category ‘professional’ on the ‘photos’ page.

Last edited by els (2006-07-03 20:48:13)

Offline

#11 2006-07-03 20:50:50

jag
Member
Registered: 2006-07-01
Posts: 10

Re: static page in section or subsection

Hi Els,

Sorry to be burdening you with my learning curve here ;)

So how do I define the page setting for a category page, can I fine tune it as much as a normal page or is it as simple as associating a page to a category to define how it is displayed ?

Thanks,

John

Offline

#12 2006-07-03 20:52:13

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

Re: static page in section or subsection

http://forum.textpattern.com/viewtopic.php?id=12311

Handcoding will only be needed temporarily too: linking to a section from category links is a feature added in svn, so it will be in 4.0.4. :)

Offline

Board footer

Powered by FluxBB