Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-13 21:16:34

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Question about Pages, Sections, Categories, and Articles...

Okay, I don’t think my question will be as hard and in depth as the title sounds, but I don’t know, so please bear with me and if I confuse anyone, let me know and I’ll try to explain better.

The site I’m building is <a href=“http://www.kentuckygolfing.com”>Kentucky Golfing</a>

1.) As you can see by the navigation, I’ve got different section of the site. Some of the sections will simply be static pages, that don’t need much updating, and some of the sections will be pages with blog/article entries. An example would be the “Instruction” link. When users click on this link, they will see a page similar to what you all see now, only the articles on the left will be about golf instruction. I also want these articles to be posted on the default/homepage also. So to accomplish this, is this what I will need to do? Create a section called “instruction”, and set it to “display on homepage”? Will doing these two things make it to where when someone clicks on the “instruction” link in the navigation that they are taken to in “instruction” page of the site to where they only see articles about golf instruction? Yet, the homepage will still be a combination of articles, whether it be from “instruction”, “golf fitness”, etc, etc?

Really what I’m looking for here is to have all articles regarless of section to appear on the homepage, and then when the visitor surfs to that particular section only have articles pertaining to that section.

2.) Second question is about categories. Do I really need to specify categories to do what I’m trying to do? Like if I’m posting an article under the section “instruction”, will I also need to specify a category of “instruction” also?

I’m going to use the plugin rss_suparchive, so if my thinking is correct, this would be the only reason I would want to specify categories, because I’m planning on having an archive page of all articles by what category they are listed in.

3.) Third and last thing is pages. Do I really need to have a different page created for every section that I have? Like I’ve got an “instruction” section, so should I also have an “instruction” page? Or would I only need that instruction page if I were planning on changing the layout for that “instruction” page? Otherwise, if I’m not changing the layout, I should just use my “default” page, right?

Thanks everyone.

Last edited by deronsizemore (2006-08-14 14:43:33)

Offline

#2 2006-08-14 17:06:27

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Question about Pages, Sections, Categories, and Articles...

Am I confusing everyone with this? Let me know and I’ll be happy to explain better or in a different way.

Offline

#3 2006-08-14 17:22:52

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: Question about Pages, Sections, Categories, and Articles...

1) Yes. Exactly right. Create a section called “instruction” and set to “display on homepage”.

2) No. You do not have to assign any categories. If you’re posting under section “instruction” you would not need to additionally assign it to a category “instruction”. rss_suparchive can also separate your articles by section…doesn’t have to be just categories.

3) You do not have to have a different page for every section. You could actually have all sections use just one page layout if you’d like. The way you’ll make it work for you is using conditionals, specifically if_section


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#4 2006-08-14 18:45:20

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Question about Pages, Sections, Categories, and Articles...

Thank you for clearing these up for me! I just seem to be having a heck of a time figuring some things out with txp. Seems I think I got it one second, then the next I don’t got it.

I am never able to get conditionals to work like I want them to. I just can’t wrap my head around them…I don’t know if it’s where I’ve never programmed in any language before or what?

But, say, every single page of my site is going to be different. Not a different layout, just different information in each column. How would I do that with conditionals?

Something like this:

<code>

<txp:if_section name=“about”>

…your content here…

<txp:if_section name=“instruction”>

…your content here…

<txp:if_section name=“content”>

…your content here…

<txp:else />

…default option…

</txp:if_section>

</code>

Is that how I would write a conditional for those sections? If it’s about do this, if it’s instruction, do this, and if it’s contact, do this…if it’s not any of those three, default option. Is that how I would write something like that?

Last edited by deronsizemore (2006-08-14 18:46:10)

Offline

#5 2006-08-14 19:02:46

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: Question about Pages, Sections, Categories, and Articles...

I’m not so familiar with the built-in txp:if_section tag..
maybe it does work as you’ve described..
but I would have used it like such:

part A:
<code><txp:if_section name=“about”>
…your content here… </txp:if_section>
<txp:if_section name=“instruction”>
…your content here… </txp:if_section>
<txp:if_section name=“content”>
…your content here… </txp:if_section></code>

part B:
<code><txp:if_section name=“about,instruction,content”>
<txp:else />
…default option…
</txp:if_section></code>

Someone else will be more useful than I and able to answer that for sure…

Personally, I’m a big fan of the mdn_if_section and ob1_if_section plugins.. they were built before txp:if_section was born as a built-in tag, but the plugins still work and do their jobs beautifully.. and the documentation on those is pretty straightforward ;).


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#6 2006-08-14 19:47:50

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Question about Pages, Sections, Categories, and Articles...

Thank you, I’ll check out those plugins you suggested.

Offline

Board footer

Powered by FluxBB