Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-05-21 19:22:03
- Hoods
- New Member
- Registered: 2008-05-21
- Posts: 2
Site structure [help understanding concept of pages/sections/articles]
Hello,
I am a relatively new TextPattern user. I’ve read through the FAQs and have searched for a couple of leads but I can’t find a solution anywhere. For the most part, I understand how each TextPattern element works together. Each section should display articles according to how the page of your choice maps them out.
I understand that; however, I can’t figure out how to use this to end up with a site in the fashion I need it.
Basically, I need this:
-The website will have five “pages” (apparently these will be sections, correct?) with different layouts, pictures, text, etc.
-The homepage will be unique looking; however, I need a list of articles (need it to display the header, excerpt, and a read-more link for three recent articles). I also need an article (from a different category) to display on the same page (need it to display the header, excerpt, and read-more link as well).
-The other pages will be static for the most part, but I also want to incorporate articles in each with unique categories so they can easily be updated by the TXP user.
I know there is something seriously wrong with how I’m approaching this all, which is why it isn’t working out. I’ve tried doing this two ways:
1)
I first had a page that just had a header, space for content, and a footer. I set it up so each page I need will have it owns section which would use a template for a static page. The static page displayed one article (a sticky) and I put that page’s layout in this one sticky article that would display itself where the content belongs. It worked out fine, or so I thought. My problem is I can’t find out how to embed the article lists I need on the page (from different categories). I scrapped this idea.
2) I noted that what I need to do only works when the articles are displayed in their respected sections and molded by their selected pages. So I decided I would make a new page for each page I want… I finally got something to look like what I need (http://www.richardsapien.com/clients/uvlonghorns/home). All that is visible under the news & updates is the excerpts and the read more links… Great, except when I click on the articles they obviously use that same page format, which is not what I want. I want them displayed in a blank page (which I have made). Also, how would I go about displaying an article from a different section(?). If that doesn’t make sense, please read below.
If you notice on my website, I have something called The Coach’s Corner. I want the most recent article from (I guess) the Coach’s Corner section to be displayed on the homepage (as well with the article list from the other section that I have above).
Anyway, I know there is alot of things fundamentally wrong with my thinking and approach, so if anybody can shed some light and help me think this through better and find a better approach, please chime in. If I can get a response that makes sense and solves all my problems and helps me get my site where it needs to be, I will be glad to Paypal some money for the help.
Thanks for reading my novel, lol.
Offline
#2 2008-05-21 20:11:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Site structure [help understanding concept of pages/sections/articles]
That’s quite a novel indeed ;) Don’t worry, it’s very simple to achieve what you want. First, I think you have complicated things by creating a section ‘home’.
Textpattern uses section ‘default’ (which is not a real section that you can assign articles to) for the front page.
So what you should do IMO is go to Presentation > Sections and assign the page template and style that you are using now for section ‘home’ to section ‘default’. For the other sections you can set if articles from those sections should be displayed on the front page. Right now you are displaying articles from section ‘home’ so let’s assume you want to keep it that way and set ‘on front page’ to ‘yes’ only for section ‘home’. You probably want to change the section name to ‘news’ or something more appropriate though.
When you now stick a <txp:article form="your_form_name" limit="3" />
tag on the page template for section default, it will only display articles for the section you’ve set to be displayed on the front page.
To display the ‘Coach’s Corner’ article on the front page as well, you’d better use <txp:article_custom section="coachs-corner" limit="1" form="another_form" />
.
On your other section’s pages you can use <txp:article />
again. It is context sensitive so it will automatically output articles from the right section.
I realize that this does not answer all of your questions yet, but it might get you started. Feel free to ask again if it doesn’t or when you get stuck again.
Also this article by Destry Wion might be helpful: Understanding Textpattern Building Blocks.
Offline
#3 2008-05-21 20:23:53
- Hoods
- New Member
- Registered: 2008-05-21
- Posts: 2
Re: Site structure [help understanding concept of pages/sections/articles]
I skimmed through your reply and from what I read I think this will help me out. I will also read that article you suggested, I remember reading it when I tried out TextPattern a couple of months ago but I had totally forgot about it. Once I re-read your post and read the article I will try things out and let you know how it goes. I appreciate you taking time to help me out, I’ll also be sure to take up your offer if I have any more questions ;)… Let me give this a shot.
Offline