Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-16 02:40:39

andrewbarnett
New Member
From: Melbourne, Australia
Registered: 2005-09-28
Posts: 5
Website

Help with organisation of static site

Apologies to those of you who haunt both these and the TextDrive forums, as I’ve posted the same question therein…

OK, I’m putting together a basic, static site for our photography business. It won’t be much more than Home, Gallery, Prices and Contact. My wife is unconvinced of the need for an extended Colophon.

I decided to use TxP, because it’s there. And because maybe the experience I gain will let me do bigger and better things down the track. Otherwise I’ll need to write some PHP to include common elements (html head, banner, menu, footer) and I still don’t get Textile throwed in.

Anyway, I’ve spent the morning nutting out how to use sections as pages, how to use ako_nav for the menu, zem_contact for the navigation… But I’m a little confused about the best way to organise things. Let me explain: I went to build the contact form. Most examples seem to embed it in a TxP form, then output that on the relevant page. Which means that I need a different page template for Contact vs Home and the rest. But, since there’s so much in common (banner, menu, footer) that seems like idiotic duplication, with the attendant risks.

I guess I could create TxP forms for common elements and then show those in each different page template. That gives me a degree of encapsulation and abstraction.

Looking for another way, I think maybe I should put the contact form in an article. Meaning that I need tags inside an article. Which works. But I need to manually add <p> markup, etc., around the txp tags. And that feels slightly kludgy.

Right now, my inclination is to wrap up all the common bits, from html declarations, banner, menu, footer, etc., as TxP forms, do the same with the Contact html form, then include them in separate page templates.

Has anyone any sensible comment or advice to offer? It’d be gratefully received.

thanks

Offline

#2 2006-01-16 03:34:06

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Help with organisation of static site

sounds like you’ll only need one page template – which contains your common elements – and make all your content ‘articles’, even the contact form (it’s just a case of throwing in the txp:zem_contact tag, with a space before it on the line to disable textiling)

of course, create sections for gallery, prices & contact … and attach articles to sections

as txp:article is context-sensitive, you’ll get the content you need on your page without creating a page template for each section

where you need to customise per section, refer to the Textbook for conditionals (txp:if_section etc)

Offline

#3 2006-01-16 03:38:55

andrewbarnett
New Member
From: Melbourne, Australia
Registered: 2005-09-28
Posts: 5
Website

Re: Help with organisation of static site

Thanks. Busy now but shall digest soon.

Offline

#4 2006-01-16 08:37:43

andrewbarnett
New Member
From: Melbourne, Australia
Registered: 2005-09-28
Posts: 5
Website

Re: Help with organisation of static site

OK. Digested. I’d figured all of that out, except whether to put the contact form in an article — with p’raps a div around it for CSS formatting — or whether to create a separate page. You’re suggesting the former. Which is definitely less work, and fewer objects to manage. It’ll do.

thanks.

Offline

Board footer

Powered by FluxBB