Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-21 16:12:03

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Urls are different depending on status

Hi everyone, me again…

I think I am just having a tough time wrapping my head around the TP does urls and directory stuctures, either that or am I am just growing more dense in the head as I get older.

I am having weird instances where I set up a section called: “housecalls”
Then I have a bunch of different articles under that section, that have their own subdirectory name, like “automotive”

So, the urls are like mysite.com/housecalls/automotive

This does not work if I have the housecalls section template set to status=“sticky”. The defaut url (set to sticky) works (mysite.com/housecalls/) fine. But any links to specific pages in that section, like mysite.com/housecalls/automotive show a blanked (no content) template for the section.

If I remove the status=“sticky” out of the template, and then make each page of the section sticky, except for the front page of that section… everything works… if you go to mysite.com/housecalls/ it works. From there clicking on mysite.com/housecalls/automotive works as well… this time showing the content.

Is this how it is supposed to work? It seems odd having to make everypage sticky, just to keep directory structure.

Is there a better way to do this?


TextPattern User – In Training

Offline

#2 2005-12-21 16:56:43

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Urls are different depending on status

Can you explain why you are using “sticky” and are you using the same page template for the section and sub-sections, and do you mean sub-sections or categories?

Last edited by thebombsite (2005-12-21 16:59:11)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-12-21 17:12:47

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Re: Urls are different depending on status

Yes, I was trying to use the same page template.. as I will be having different templates for each section already… didn’t want to have a whole other set of templates just for subpages… but maybe I need to?

I figured that I would be using categories to define subsections, no? Do I create sections for each sub-section?

I’m so lost. I have read and re-read all of the wiki… various links, and the posts here. My head is spinning.


TextPattern User – In Training

Offline

#4 2005-12-21 18:05:40

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Re: Urls are different depending on status

Okay.. I guess the bottom-line that I need to learn how to do, is:

How do I create several pages that are linked to each other in the same SECTION.

section/articles- main landing page (that is permanent) that links to all of the individual articles below:
section/article1
section/article2
section/article3

I think what I want is pretty much exactly what is described in this old thread: http://forum.textpattern.com/viewtopic.php?id=5214
I am discouraged because it doesn’t appear as anyone ever resolved this layout style..

Last edited by SCARECR0W (2005-12-21 18:06:35)


TextPattern User – In Training

Offline

#5 2005-12-21 18:31:50

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Re: Urls are different depending on status

Okay.. I think I just figured something out… shock!

If you place a second txp:article tag – it seems to allow you to do the above.

God, I wish this was better documented somewhere.

Once, I get up and running, and a lil more secure in knowing what I am doing.. I plan to make notes in the wiki or something.

Thanks for looking and reading my hapless postings… ;-)


TextPattern User – In Training

Offline

#6 2005-12-21 19:42:35

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Re: Urls are different depending on status

Okay…once again, thought I had it.. but no go.

I have two separate categories, for “primary” and for “secondary”.
primary==main landing page with links to other articles within the same section.
secondary==actual article pages within same section.

So, why doesn’t:
<txp:if_category name="secondary">
<txp:article limit="1" status="live" />
<txp:else />
<txp:article limit="1" form="Single" status="sticky" />
</txp:if_category>

Do what I want here?

I have each of the articles that are live, set with the secondary category
The main page, which is set to sticky, is set to primary category.

Currently, I am getting the < else > part… which is just showing the main page. But all of the secondary articles do not show up at all.. just a blank template.

I am so frustrated. I am losing hope, and starting to think that I made a mistake in choosing TP.

Help.

BTW> as always, you can the dev site here: <a href=“http://pixelsoap.com/about”>devsite<a/>

Last edited by SCARECR0W (2005-12-21 19:44:30)


TextPattern User – In Training

Offline

#7 2005-12-21 19:54:22

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Urls are different depending on status

I think you are looking for this:

http://forum.textpattern.com/viewtopic.php?id=11952
(nardo’s: static site with dynamic two-level nav)

If you follow that, be aware that the plugins are basically only for auto-creating the nav. If you want to handcode the nav for all relevant pages/sections, you can do the same without plugins.

Are you using the url-schema /section/title? In that case your articles would be the “leaf” landing pages showing only individual articles.

Offline

#8 2005-12-21 20:21:10

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Re: Urls are different depending on status

Hi Sencer, yes.. I am using /section/title.

Okay.. that is a lot of stuff to dig through.. I better sit down and go through that carefully… my main concern is that this is going to be a large corporate site, and I need flexibility down the road.

Quickly scanning through that thread, I see that it may not be very well suited to a large site?

I originally planned on moving my current portfolio site over to TP from WP… but then this project came along, and I thought, what the hell… if this doesn’t allow me to learn the ins and outs of TP, then nothing will.. LOL

I may end up re-thinking that, and end up using TP for my smaller, portfolio type site and go with something else for the larger corporate site.

Is there anything in the works for aleviating some of these navigation issues when trying to use TP as a larger CMS?

That was my primary knock against WP… and it appears that TP has similar issues. Too much hacking involved. I am not trying to trash talk or anything, by any means… just trying to make an educated decision here, and one that I won’t later regret, if you know what I mean?


TextPattern User – In Training

Offline

#9 2005-12-21 20:32:49

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Urls are different depending on status

If you are using the same page template then you could use the <code><txp:if_category name=“categoryName”></txp:if_category></code> tags to create separate code with it’s own article tag for each “category” instance. No plug-ins or hacks required. And you haven’t explained why you decided to use “sticky”.

I’m not sure someone else’s site is the best subject for a lesson in how to use TXP. ;)

Last edited by thebombsite (2005-12-21 20:36:43)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#10 2005-12-21 20:38:24

SCARECR0W
Member
From: Biloxi, Mississippi
Registered: 2005-12-16
Posts: 13
Website

Re: Urls are different depending on status

Hi Stuart,

I thought that was what I was trying to do above. Are you suggesting a different method than the way I was going?

I am confused – I don’t know how I would create what you describe.

[edit]

I am using sticky.. to make the “landing page” 1st article in each section… always remain as the 1st article in each section.

Someone else’s site.. is my company’s site… so not like it’s a client (kinda anyways) ;-)

Last edited by SCARECR0W (2005-12-21 20:43:21)


TextPattern User – In Training

Offline

#11 2005-12-21 23:01:19

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Urls are different depending on status

When you go to these “other” pages are you linking directly to an article? The reason I ask is because if you are then you are going into “individual_article” view so have you told TXP via your page template code what to do in that view? If I am going down the right lines here there are 2 more tags to consider – <code><txp:if_article_list></code> and <code><txp:if_individual_article></code>. If you are using a single page template for both views you need to tell TXP what to do in both instances.

Really, I need to know what links you are using.

Last edited by thebombsite (2005-12-21 23:03:32)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2005-12-21 23:02:50

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Urls are different depending on status

@SCARECR0W: Flexibility is not an issue, especially not, if you are able to code your own plugins. I see two potential issues: One is automating the special things you want, like navigation for just the kind of site you want to do. Since there are dozens of dozens of ways to build a site, there is not a single automated way to generate the kind of navigation you may want out of the box. However it can be custom-coded. The way plugins are made, this will not hinder you to make future upgrades (without hassles). The second potential issue is that Textpattern does not have sub-sections, which some find important when they want their site hierarchy to be reflected in the url-structure- If that is a highly important goal for you (hierarchical sites with arbritrary levels which reflect in the url-structure), then you may feel like you have to work “against txp” at some points (and if you can’t or don’t want to code, I suggest you really look for another tool for this particular task), especially when being new to txp.

Offline

Board footer

Powered by FluxBB