Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-03-16 11:18:13
- joffo46
- New Member
- Registered: 2007-03-10
- Posts: 3
Static homepage
Hello,
I’m using Textpattern as a content manager rather than a blogging tool. So far it works very well.
One question: is it possible to have an introduction on the homepage (instead of displaying the latest posts?)
Thx
Offline
Re: Static homepage
Just put static content in your default page and assign the default section to default, unless it already is (likely), then create other sections according to your structure and place the dynamic content in pages that refer to them respectively.
:)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#3 2007-03-16 17:20:05
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: Static homepage
Also described in FAQ: Can I mix blog, static, and gallery pages? and How do I manage static pages?
Regards,
Joey
Offline
Re: Static homepage
ma_smith wrote:
Just put static content in your default page and assign the default section to default, unless it already is (likely), then create other sections according to your structure and place the dynamic content in pages that refer to them respectively.
Alternatively you can do something like <txp:if_section name="">your static content<txp:else /><txp:article limit="10"></txp:if_section>
or even you could use my favourite plugin glx_if which among, other things that it does, helps you separate the front page from the excerpts page.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#5 2007-03-25 11:54:14
- redcrew
- Member
- Registered: 2007-03-23
- Posts: 16
Re: Static homepage
I’m also using Textpattern (first time user) on a nonprofit website (less than 12 pages) as a content management system with static pages. I’m in the process of converting the existing site to Textpattern.
After reading the FAQ on static pages, I’ve set up the static pages, one for each section, and it’s working fine. However, how do I add another static page to a section?
For example, in the About section, I have the main About page. How do I add another page in that section, for example, a boardmembers page, which is also static?
Similar question for the Contact page. I’ve used the zem_contact_reborn plugin for the Contact page, and want to redirect the user to a “thanks” page. I read a solution on the forum where someone set up a specific section called “thanks” for the thanks page, but it doesn’t seem practical to me to set up a separate section.
I did some searching online for example Textpattern sites that seem to be doing what I’d like. I found http://tatteredfly.com/fly_tying/submit-fly-pattern/ where it appears the site is using a static pages, and has another page under the fly_tying section. How did the developer do that?
Offline
Re: Static homepage
categories are your friend :)
Think of them as a taxonomy horizontally opposed to sections. woof!
How?- Create categories for those sub-pages (boardmembers).
- Create one article per category with…
- the category (boardmembers) assigned
- the parent section (About)
- the status of live (this will keep them of the main section page)
So on your page you could do something like
<txp:if_category>
<txp:article status="live" form="your-form" limit="1"/>
<txp:else/>
<txp:article status="sticky" form="your-form" limit="1" />
</txp:if_category>
You can access your subpages with http://tld.com/section?c=category.
On the contact thing, just use the built-in options attributes to get a thanks form all by itself on a page… no need for .
Last edited by mrdale (2007-03-25 17:40:46)
Offline
#7 2007-03-25 18:05:57
- redcrew
- Member
- Registered: 2007-03-23
- Posts: 16
Re: Static homepage
Thanks! Some of this is making sense. A few clarifications, may I presume again on your knowledge and experience?
1. If I understand your textpattern code correctly, the forms you’re referring to would be two different forms, one for the content of the About page, one for the content of the Boardmembers page. Is that correct?
2. If the answer to question 1 is yes, then I would:
- Move the About content that is currently text in the sticky article named “About”, into a form called “about”.
- Create a live article named “Boardmembers” with no content in it, with the settings you recommend in your response.
- Create a form with the content for “Boardmembers”.
Is that correct?
I may be thinking of forms differently, but I had understood forms to be used for code (like headers, footers, etc.) that is repeatedly used throughout the site.
Last edited by redcrew (2007-03-25 18:13:22)
Offline
Re: Static homepage
The forms are just how your article is formatted, so they have no bearing on what you’re trying to do. You can use the same form for each.
The code snippet goes directly on the page, and should work for any section.
Offline
#9 2007-03-25 22:06:11
- redcrew
- Member
- Registered: 2007-03-23
- Posts: 16
Re: Static homepage
I created an article named “boardmembers” and assigned it to a category named “Board” within the “About” section, but no article content is displayed when I try to access the category page by URL:
http://www.mysite.com/about?c=Board
I’m still a bit confused by your recommendation that I “can use the same form for each”.
I understood your comment to mean one form contains both the “About” content and the “Boardmember” content.
Did I misunderstand?
When you refer to “The code snippet goes directly on the page” are you referring to the page template used for all the sections? Or the form used within the page template? I’m a bit confused about what to change.
My current page template (named “static_page”) for the static pages has the following code:
<txp:article limit=1 form="static_article" status="sticky" />
The static_article form contains the following code:
<div id="main-content">
<h1><txp:title /></h1>
<txp:body />
</div> <!-- end #main-content -->
Last edited by redcrew (2007-03-25 22:24:49)
Offline
Re: Static homepage
can you please post the url of your site?
The category address in messy url mode should be http://www.mysite.com/?c=Board
Last edited by colak (2007-03-26 06:44:12)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#11 2007-03-31 21:42:02
- redcrew
- Member
- Registered: 2007-03-23
- Posts: 16
Re: Static homepage
Colak: I’m still confused, I haven’t been accessing the pages with messy urls. I set up the site in the preferences to not use messy urls. Is it possible to still access pages using messy urls if the site has been set up not to use messy urls? Here’s the url for the test site.
What I want is to have the website set up so the contact page is accessed as:
www.lireo.com/tpcms/contact/
and the thanks page for successfully submitting a contact form is accessed as:
www.lireo.com/tpcms/contact/thanks/
If you view the site, note that only the “About” and “Contact” section pages have been set up with content. I used the information in the Textpattern FAQ to set up static pages for the sections.
The content for the thanks page was created as an article, with the article status set as “live”, assigned to the “contact” section, and the “Thanks” category. The url-only title was set as “thanks”.
If you visit the thanks page , you will notice that none of the main content is displayed in the left column of the page. The contact page displays how content should appear on pages.
mrdale:
Sorry, I don’t understand how I would use the conditionals in your code given I set up the content in articles not forms. I created articles for the About and Content page content.
A new page template named static_page was created for the About and Content pages, which uses a form called static_article which brings in the main content from the About or Content article into the static_page template.
From what I understood from mrdale (and I may be misunderstanding), he is advising that I set up individual forms for each page’s content. I thought the main content for the page came from articles?
So, I’m still confused. And haven’t progressed in the past week, despite much reading of Textpattern blogs and websites. Is there some information any of the experts can point me to? I didn’t think it would be this challenging. This is an eight page site I used as a test for Textpattern.
Last edited by redcrew (2007-03-31 21:49:31)
Offline
Re: Static homepage
redcrew wrote:
Colak: I’m still confused, I haven’t been accessing the pages with messy urls. I set up the site in the preferences to not use messy urls. Is it possible to still access pages using messy urls if the site has been set up not to use messy urls? Here’s the url for the test site.
yes
What I want is to have the website set up so the contact page is accessed as:
www.lireo.com/tpcms/contact/and the thanks page for successfully submitting a contact form is accessed as:
www.lireo.com/tpcms/contact/thanks/If you view the site, note that only the “About” and “Contact” section pages have been set up with content. I used the information in the Textpattern FAQ to set up static pages for the sections.
The content for the thanks page was created as an article, with the article status set as “live”, assigned to the “contact” section, and the “Thanks” category. The url-only title was set as “thanks”.
If you visit the thanks page , you will notice that none of the main content is displayed in the left column of the page. The contact page displays how content should appear on pages.
Check if have a txp:body
tag in your form
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline