Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-02 16:56:37

jackson
Member
Registered: 2005-10-01
Posts: 14

Hello from EE user! Also, help with organization.

Hey everyone —

I am a pretty experienced ExpressionEngine user and have also set up a few sites with WordPress, but I’m about to take my first foray into Textpattern. This CMS seems very, very cool, but I’m having a tough time getting my head wrapped around a few things. I help people with EE in the pmachine forum who have trouble with EE, so now I know how it feels! :)

Anyway,I am looking to set up a new site for someone who has the following requirements: the main page will be a static welcome type of page that will not change. There are 8 main areas of this site: Home page (static), About page (static), Contact page (static), Project One (static), Project Two (static), Daily Blog, Tips on Topic A, Tips on Topic B, Links related to Topic A, and Links related to Topic B. The daily blog will be the only area with public commenting. And when I say “static” I don’t mean literally static html pages, I just mean those pages will have only 1 article or entry that won’t change. The Tips pages will have multiple articles, short blurbs from time to time on Topic A or Topic B.

After reading very carefully the TP FAQ, as well as doing some browing through this forum, it seems to me that a good way to set this up would be as follows (and here is where I’d like folks to double-check my work).

We could have 6 Textpattern Sections: Home, About, Contact, Projects, Tips, Blog. I would create two categories, Topic A and Topic B, so that the tips can be sorted by those two categories, the links can be sorted by those two categories, and the blog entries can be sorted by those two categories.

Now, on the main “home” page, this person wants a naviagtional list of links in the left column like this:

Home
About
Contact

Projects
-Project One
-Project Two

Blog

Tips
-Tips on Topic A
-Tips on Topic B

Topic A Links
*Link related to Topic A
*Link related to Topic A
*Link related to Topic A
*Link related to Topic A

Topic B Links
*Link related to Topic B
*Link related to Topic B
*Link related to Topic B

I’ll stop there for now. How am I doing so far? Is the functionality needed contained all within base TP or do I need to get some plugins? From my searching through the forums, it seems like I will need something to display articles by Category. I was thinking that “Tips” would be a Section and Topic A and Topic B would each be a separate category, so I would need some way to display articles by category, I think.

Do I combine Home, About, Contact into one Section, since they are all sort of “administrative” static pages?

Anyway, thanks for reading this far and I look forward to your guidance.

Last edited by jackson (2005-10-02 16:59:00)

Offline

#2 2005-10-02 17:34:45

Elenita
Member
From: Falls Church, VA
Registered: 2004-05-16
Posts: 407
Website

Re: Hello from EE user! Also, help with organization.

Hi, and welcome to Textpattern!

I’m a relative newbie myself, so I’ll leave the more complicated stuff to the more experienced hands. What you want to do with the static pages, however, is relatively easy.

For each section that you want static content (e.g., home, about, contact, etc.) create one article and associate it with that section. In the article body, type the static content you want to show up in that section’s page, make sure it’s live, and make note of the article id. And then in that’s section’s template, include the following tag:

<blockquote><code><txp:article_custom id=“n” /></code></blockquote>

where <em>n</em> is the article’s id number.

There are many ways to fine-tune how the article is displayed. The Textbook project’s <a href=“http://textpattern.net/wiki/index.php?title=Txp:article_custom_/”>entry on this tag</a> lists all the available attributes. And incidentally, if you haven’t checked out Textbook yet, I highly recommend it; it may not be completely comprehensive, but it’s incredibly helpful.

Again, welcome!

Offline

#3 2005-10-03 03:14:23

jackson
Member
Registered: 2005-10-01
Posts: 14

Re: Hello from EE user! Also, help with organization.

Thank you for the welcome, Elenita!

I had come across the Textbook project, but was not aware of the article_custom tag — thanks for pointing that one out. Would I make each static page its own Section, e.g., Home, About, Contact or could I make 1 Section called “Static” and have 3 articles in that one Section: Home, About, and Contact? I’m thinking the former.

If anyone has any thoughts on the overall organization etc. I would appreciate the feedback. Thanks!!

Offline

#4 2005-10-03 03:50:30

Elenita
Member
From: Falls Church, VA
Registered: 2004-05-16
Posts: 407
Website

Re: Hello from EE user! Also, help with organization.

If you’re using clean urls, sections emulate folders in your site’s urls (e.g., www.yoursite.com/section/) so I recommend having separate sections for each of your static areas. That way you get www.yoursite.com/about/ and www.yoursite.com/contact/

<strong>Note:</strong>: the “default” section is an exception, the only exception, to the rule above. That section is the root (i.e. “home”) of your Textpattern install, not www.yoursite.com/default/. In other words, there is no need to create a new section for home—default will serve this purpose.

And rereading your first post, one thought that occurs to me is that your navigation scheme can be entered directly onto the default template (or even the static entry itself), but if you think it might be needed in more than one spot, your best bet would be to create a new form and call it wherever it’s needed. That way, if it ever needed to be changed, you would only need to make the changes in one place.

Sorry if any of this is unclear; I’m about to fall asleep in front of my keyboard. Feel free to ask for any and/or total clarification.

Last edited by Elenita (2005-10-03 03:55:09)

Offline

#5 2005-10-03 15:18:31

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

Re: Hello from EE user! Also, help with organization.

With regard to your “static” pages create a section for each one except Home which will be the default section. Now you can use a single page template to cover all of these by using the <code><txp:if_section name=“SectionName”></txp:if_section></code> tags. For your Home page the section name will be name=”“, in other words nothing. Between the if_section tags you can simply use the <code><txp:article /></code> tag as it is context-sensitive and will only call articles for the section being viewed. If you want to style these articles differently in each section then create an “article” type FORM template and call it using <code><txp:article form=“FormName” /></code>.

Doing it this way should reduce your page templates.

For your Blog you will need a page template that is designed to view both “article lists” and “individual articles”. The “Archive” template that comes with TXP does this so you could simply copy it to a new name and edit it as you wish.

Last edited by thebombsite (2005-10-03 15:26:00)


Stuart

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

Offline

#6 2005-10-03 16:20:45

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: Hello from EE user! Also, help with organization.

Hi jackson, and welcome to txp :-)

You’ll like it, I can tell since I know both EE and TXP and the underlying logic is not so far apart (I know I might get a few flames but…).

Some time ago, I had drawn a rough comparison of EE and TXP

It would require some dusting since it’s a bit old, but basic ideas remain true.


.: Retired :.

Offline

#7 2005-10-03 16:38:57

jackson
Member
Registered: 2005-10-01
Posts: 14

Re: Hello from EE user! Also, help with organization.

Wow — thanks for all the posts. Elenita and Stuart, I appreciate the coding tips.

Elenita, your idea on putting the navigation links in a new form and call it whereever I want is a good one. I did the same thing with EE using its templates. I would create a template that just had the navigation links and then used EE’s embed tag to embed the navigation template whereever I wanted. How would I embed or link to a non-article “form” like a list of navigation links?

Stuart, your tips are very appreciated. I took a look at your Red Train port since you indicated in another thread that the Red Train does a lot without plugins. I am studing that port now — cheers for the work. (I also remember you from working with Root in Wordpress). I am still trying to figure out how to actually insert a link to a section as well as how to link to categories. In my outline above I had thought about creating a Section called Tips and then two categories, Tips on Topic A and Tips on Topic B. Maybe that’s not the right approach. Maybe I should have a Section called Topic A and a Section called Topic B. As Elenita helped me understand, I see that Sections in TXP are sort of like the EE weblogs — “data containers” that can have articles, comments associated with it and that categories are merely a way to separate the articles within a Section. Since the Sections are sort of like virtual “folders” in a directory tree, I guess I would then link to them like this: www.example.com/topica and www.example.com/topicb ?

David — thanks for the link to your comparison of EE and TXP. I like it and it makes sense to me, as an EE user. I totally “get” how EE works in my head. It all clicks. Now I just need to get to that point with TXP. :)

Cheers to everyone — I appreciate the thoughts and comments.

Offline

#8 2005-10-03 18:13:14

Elenita
Member
From: Falls Church, VA
Registered: 2004-05-16
Posts: 407
Website

Re: Hello from EE user! Also, help with organization.

<blockquote>Elenita, your idea on putting the navigation links in a new form and call it whereever I want is a good one. I did the same thing with EE using its templates. I would create a template that just had the navigation links and then used EE’s embed tag to embed the navigation template whereever I wanted. How would I embed or link to a non-article “form” like a list of navigation links?</blockquote>

The tag, which is also accessible via “output form” on the left side of the presentation page is <code><txp:output_form form=“name” /></code> where <em>name</em> is the uh, name of the form with the navigation code. And on a related note, one thing to keep in mind when you create that particular form is that your form type should be “misc”.

<blockquote> Maybe that’s not the right approach. Maybe I should have a Section called Topic A and a Section called Topic B. As Elenita helped me understand, I see that Sections in TXP are sort of like the EE weblogs — “data containers” that can have articles, comments associated with it and that categories are merely a way to separate the articles within a Section. Since the Sections are sort of like virtual “folders” in a directory tree, I guess I would then link to them like this: www.example.com/topica and www.example.com/topicb ?</blockquote>

I’ve never used EE so I’m not sure what a “data container” is, but I do think I’ve introduced an ambiguity in my last post that should be cleared up: the difference between a section and a category. I had some trouble with this when I started using TxP too (I think it’s a common misunderstanding), and the distinction is this:

  • <strong>Categories</strong> separate different <em>topics</em> of content. Examples of possible categories are my family, work, hobbies, and travel.
  • <strong>Sections</strong> separate different <em>types</em> of content. Examples of possible sections are a blog, a portfolio, a links list, and a contact page that displays information on how to reach you.

In addition, <strong>categories</strong> are pretty much global; article categories are available to <em>all</em> articles, file categories are available to <em>all</em> files. Thus, you can blog about a hypothetical trip to Antarctica and publish a photoessay about it in your portfolio, and file both under travel. And if a reader is navigating your site by category, he/she will see both the blog entry and the photoessay listed (assuming they were both published as articles).

As a result, the example urls listed above (www.example.com/topica/ and www.example.com/topicb/) are unnecessarily creating sections limited to topic—that would be better handled by categories. Does that make sense?

Last edited by Elenita (2005-10-03 18:14:08)

Offline

#9 2005-10-03 18:54:35

Elenita
Member
From: Falls Church, VA
Registered: 2004-05-16
Posts: 407
Website

Re: Hello from EE user! Also, help with organization.

<blockquote>Thus, you can blog about a hypothetical trip to Antarctica and publish a photoessay about it in your portfolio, and file both under travel. And if a reader is navigating your site by category, he/she will see both the blog entry and the photoessay listed (assuming they were both published as articles).</blockquote>

Since that isn’t particularly clear…

Here’s perhaps a clearer example differentiating sections and categories. Let’s say you’re a blogger who loves to read, and thus set up two sections: blog and reviews; blog contains a daily blog, and reviews is where you post book reviews. Thus, the urls are:

http://www.example.com/blog/
http://www.example.com/reviews/

Let’s say one day, you post an entry to your blog about how much you want to visit New Zealand one day. And then, a month later, you post a review of someone’s memoirs about living in South Africa. If you categorize both articles under travel, they should appear to any reader who’s browsing your site by categories—even though those articles are in different sections:

http://www.example.com/category/travel/

Hope this helps!

Last edited by Elenita (2005-10-03 19:06:15)

Offline

#10 2005-10-04 03:01:53

jackson
Member
Registered: 2005-10-01
Posts: 14

Re: Hello from EE user! Also, help with organization.

Thanks so very much, Elenita. You have helped me tremendously. Things are starting click…

I’m still testing and trying out some things. The Textbook section that lists all the tags is turning out to be very useful.

Thanks again!

Offline

#11 2005-10-19 06:18:26

jordanwollman
Member
From: Dallas, TX
Registered: 2005-08-25
Posts: 19
Website

Re: Hello from EE user! Also, help with organization.

<blockquote><code><txp:if_section name=“SectionName”></txp:if_section></code> tags. For your Home page the section name will be name=”“, in other words nothing. Between the if_section tags you can simply use the <code><txp:article /></code> tag as it is context-sensitive and will only call articles for the section being viewed. If you want to style these articles differently in each section then create an “article” type FORM template and call it using <code><txp:article form=“FormName” /></code>.

Doing it this way should reduce your page templates.</blockquote>

Can you explain this a little bit better? I’m trying to use a single template for all of my pages, but I can’t seem to get the content to show up unless I use this code: <code><txp:article_custom form=“article_body_only” category=“contact” section=“Contact” /></code>

I don’t know if what I’m trying to explain is making any sense or not, but I’d appreciate all the help I can get. :D


Jordan Wollman [url=http://www.fringeimage.com/]// Fringe Image[/url][/color]

Offline

Board footer

Powered by FluxBB