Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-05-29 20:12:03
- Charlie Chalk
- Member
- Registered: 2005-09-06
- Posts: 51
Best way to create a a one page site FAQ
Hi
I have a small FAQ to display on my site. I have it done manually at the moment, but would love to do it with textpattern forms.
Layout is a series of questions at the top, linked to the answers (on the same page) below. There are about a dozen questions/answer combinations.
I guess there is a way of creating a new article for each question, but when I try this I get a new page for each answer and I want questions and answers to be on the same page.
Ultimatley I’d like to intergrate the scrolling effect at moo.fx – but one step at a time!
If someone can put me on the right track I’d appreciate it
CC
Offline
Re: Best way to create a a one page site FAQ
Perhaps something like this would work (not guaranteed):
Section: /faq/
Page: faq
<code>
<html>
<head>
<title><txp:page_title /></title>
</head>
<body>
<ul>
<txp:article form=“faq_toc” limit=“999” />
</ul>
<dl>
<txp:article form=“faq_content” limit=“999” />
</dl>
</body>
</html>
</code>
Form: faq_toc
<code>
<li><a href=”#faq_<txp:article_id />” title=“Jump to the answer”><txp:title /></a></li>
</code>
Form: faq_content
<code>
<dt id=“faq_<txp:article_id />”><txp:title /></dt>
<dd><txp:body /></dd>
</code>
edit: It works! Just tested it locally. By default, both the questions and answers will be sorted by the post date, but you could sort them both by category with the following attribute: sortby="Category1"
Last edited by deldindesign (2006-05-29 20:39:31)
Offline
#3 2006-05-29 20:34:02
- Charlie Chalk
- Member
- Registered: 2005-09-06
- Posts: 51
Re: Best way to create a a one page site FAQ
Thanks Jon-Michael, I’ll give that a try now.
I see from your site you use a D70. I’ve had mine for a couple of years now and still absolutley love it. Bought a SB600 Speedlight for it last week, never needed to do flash photography until now (interior shots for a customer to do) it is fantastic!
Thanks again
CC
Offline