Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-07-09 21:18:59
- CRP
- New Member

- From: Milwaukee, WI
- Registered: 2004-08-26
- Posts: 5
Sections, Pages, and Front-Page Excerpts (oh my!)
My goal for a TextPattern site is threefold:
1st Create 5 sections each with unique pages (E.G. The section “Santa Claus” has it’s own page—something like “http://www.mysite.com/santa_claus/”)
2nd All articles appearing in any of the sections would have an excerpt on the Front or Home page. (Clicking on the excerpt would lead to the full article on the appropriate section page)
3rd Blog links, useful links, etc., would be unique on each section page.
Being somewhat of a TXP neophyte, Destry’s articles Understanding Textpattern Building Blocks and Textpattern Building Block Mechanics are a big help to understanding the nuances of TXP (dynamic vs. static; sections vs. folders; pages vs. files, etc.). Even so, I’m struggling in creating a section with its own unique page template as described above. (I.E. It is a bit more complicated than simply creating a new section and page.)
Based on my reading in the FAQ, Forum, and other resources, it appears that using a static page methodology is the only way to do this at the present time. Do you concur? Might there be another way? Is there yet another way being planned for upcoming releases?
I’ve got 4.0.3 installed and ready to roll. I’d appreciate your vantage point on my endeavor as well as links for me to continue reading up on.
- crp
Offline
#2 2006-07-09 21:31:39
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
CRP wrote:
1st Create 5 sections each with unique pages (E.G. The section “Santa Claus” has it’s own page—something like “http://www.mysite.com/santa_claus/”)
…
(I.E. It is a bit more complicated than simply creating a new section and page.)
Why is it more complicated?
2nd All articles appearing in any of the sections would have an excerpt on the Front or Home page. (Clicking on the excerpt would lead to the full article on the appropriate section page)
Set for all sections ‘On front page’ to ‘yes’.
Excerpts: see FAQ.
3rd Blog links, useful links, etc., would be unique on each section page.
You can do that by creating link categories in accordance with your sections.
Based on my reading in the FAQ, Forum, and other resources, it appears that using a static page methodology is the only way to do this at the present time.
I’m not so sure. Do you sections each have more than 1 article? Will you add articles regularly?
Offline
#3 2006-07-10 00:08:31
- CRP
- New Member

- From: Milwaukee, WI
- Registered: 2004-08-26
- Posts: 5
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
Els, thank you for the response.
Why is it more complicated?
From my viewpoint, things are not as logical as I would like them to be. However, I’m still learning! Here’s what I’ve done to create an example section and page:
1. copy the Default Page and named it “santa_claus”
2. create a Form entitled “santa claus”…section name: santa_claus …section title: Santa Claus …Uses page: santa_claus …Uses style: default …Selected by default? No …On front page? Yes …Syndicate? Yes …Include in site search? Yes
3. create the Category “Traditions”
4. create an Article …Live …Categorise: Traditions …Section: santa_claus …Comments: On
The excerpt of the above example appears on the front page. However…
Clicking on the title as well as the (more…) link yields the santa_claus page (page template) rendered properly but without the full article. (the article section is completely blank).
Clicking on the “Filed Under: Traditions” link yields the Traditions Category page with the excerpt but without the full article.
Obviously I am not comprehending exactly what needs to be changed in order for the full article to be seen when clicking the title, (more…), and Filed Under: Traditions links.
Set for all sections ‘On front page’ to ‘yes’.
Excerpts: see FAQ.
On front page? Yes (see above example)
Excerpts: Method 2 on the FAQ link above was already included in the default form of the TXP layout I’m using.
You can do that by creating link categories in accordance with your sections.
I’ll read up further on creating link categories. My first concern is getting the sections and pages set up correctly.
I’m not so sure. Do you sections each have more than 1 article? Will you add articles regularly?
Yes—all sections will have more than 1 article with articles being added on a regular basis.
Offline
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
Without seeing your code, we can’t say for sure exactly what the problem is. However:
<blockquote>copy the Default Page and named it “santa_claus”</blockquote>
If you didn’t modify the template at all, it makes sense that an article isn’t displayed because you haven’t put in any code that tells Textpattern to display the full articles.
Offline
#5 2006-07-10 01:17:09
- CRP
- New Member

- From: Milwaukee, WI
- Registered: 2004-08-26
- Posts: 5
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
Thank you for your reply Elenita.
Elenita wrote:
Without seeing your code, we can’t say for sure exactly what the problem is.
True — I’d be happy to post at your request (or you can visit semidriven.com)
If you didn’t modify the template at all, it makes sense that an article isn’t displayed because you haven’t put in any code that tells Textpattern to display the full articles.
I did not modify the template—that’s where I’m getting stuck.
Offline
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
Sure, go ahead and post your code; that’d probably be the easiest way to help you out. If need be, check out reread <a href=“http://textpattern.com/faq/43/how-do-i-post-tags-and-code-on-the-forum”>this FAQ re: posting code</a>.
One tip that might point you in the right direction is this: the “front page” of a section (e.g., www.yoursite.com/santa_claus/) and individual article pages (e.g., www.yoursite.com/santa_claus/an-example-entry) in that section share a template. If you want them to look different, and you probably do, be sure to specify that using conditional tags <code><txp:if_individual_article></code> and <code><txp:if_article_list></code>.
Last edited by Elenita (2006-07-10 02:11:00)
Offline
#7 2006-07-11 01:01:24
- CRP
- New Member

- From: Milwaukee, WI
- Registered: 2004-08-26
- Posts: 5
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
Elenita wrote:
Sure, go ahead and post your code;
Here’s the code of the santa_claus page template (identical to the default page template).
<code>…(skipped code)
<h1><txp:if_individual_article><txp:section title=“1” />: <txp:page_title
/></txp:if_individual_article><txp:if_article_list><txp:if_section name=”“>Home
Page: <txp:sitename /><txp:else /><txp:section title=“1” />: <txp:sitename
/></txp:if_section></txp:if_article_list></h1>
…
<txp:if_section name=”“>
<txp:if_category>
<h2 class=“categorytitle”><txp:category title=“1” /> Category</h2>
</txp:if_category>
<txp:article limit=“4” />
<txp:output_form form=“postnavigation” />
</txp:if_section>
<txp:if_section name=“about,contact”>
<txp:article form=“Single” listform=“Single” />
</txp:if_section>
<txp:if_section name=“links”>
<txp:output_form form=“links_page” />
</txp:if_section>
<txp:if_section name=“archivescat”>
<txp:output_form form=“archivescat_page” />
</txp:if_section>
<txp:if_section name=“archivesmonth”>
<txp:output_form form=“archivesmonth_page” />
</txp:if_section>
…</code>
One tip…the “front page” of a section and individual article pages in that section share a template. If you want them to look different, and you probably do, be sure to specify that using conditional tags <code><txp:if_individual_article></code> and <code><txp:if_article_list></code>.
Good tip. In the above page template code, conditional tags as you specified are being used.
Offline
#8 2006-07-12 01:52:30
- CRP
- New Member

- From: Milwaukee, WI
- Registered: 2004-08-26
- Posts: 5
Re: Sections, Pages, and Front-Page Excerpts (oh my!)
Elenita wrote:
If you didn’t modify the template at all, it makes sense that an article isn’t displayed because you haven’t put in any code that tells Textpattern to display the full articles.
Update:
<code><txp:if_section name=“santa_claus”></code> did the trick.
(Adding the section name “santa_claus” to the santa_claus default page template code line: <code><txp:if_section name=”“></code>)
Offline