Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-10 06:24:08

dada78
Member
From: New York
Registered: 2005-10-27
Posts: 138
Website

Make HTML Layout Work with Textpattern

Okay guys. I have looked through the textbook, F.A.Q etc. but what I really need to understand the underlying principle of Textpattern is some sort of work flow tutorial. After hours and hours of trying to figure it out I am at my wits end ;-( I have accomplished some things but don’t really know how you go from start to finish.

Can anybody in some simple steps descripe how one goes from a designed html layout to implementing the design in textpattern and make it work?

Last edited by dada78 (2005-11-10 06:24:41)

Offline

#2 2005-11-10 13:39:02

marvincooper
Member
Registered: 2004-10-13
Posts: 43

Re: Make HTML Layout Work with Textpattern

Can you let us know what you have achieved so far? Have you tried editing the html in the default page template? Basically, your html will just wrap around the txp tags in your (textpattern) page. You should be able to take the default page, swap the default html for your html and take things from there.

However, before getting stuck into the page structure and layout, you may find it beneficial to get the hang of what the core txp tags do first, especially the article and article_custom tags.

Offline

#3 2005-11-10 13:46:08

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Make HTML Layout Work with Textpattern

Dada,

Lets say you have this code in regular html:
<code>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“content-type” content=“text/html; charset=utf-8” />

<link rel=“stylesheet” href=”/css/work.css” type=“text/css” />

<link rel=“alternate” type=“application/rss+xml” title=“RSS 0.92” href=”/?rss=1” />
<link rel=“alternate” type=“application/atom+xml” title=“Atom 0.3” href=”/?atom=1” />

<title>artiswork.org</title>

</head>
<body>

<div id=“wrapper”>
<div id=“insideWrapper”>

<div id=“masthead”>
</div><!—close masthead—>

<div id=“content”> <h2 class=“main”>This is a header</h2> <p>This is some content</p>
</div><!—close content—>

<div class=“clear”>
</div>

<div id=“footer”>
</div><!—end footer —>

</div><!—end insideWrapper —>
</div><!—end Wrapper —>

</body>
</html>
</code>

In textpattern, you can put your whole header into a form and call it header, save it as a misc. Then you have a section called about, which uses a page called about (or you can use one page for all your sections?).

In that page you can call the form “header” (which would probably be the same across all of your pages) , which looks like this:

<code> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“content-type” content=“text/html; charset=utf-8” />

<link rel=“stylesheet” href=”/css/work.css” type=“text/css” />

<link rel=“alternate” type=“application/rss+xml” title=“RSS 0.92” href=”/?rss=1” />
<link rel=“alternate” type=“application/atom+xml” title=“Atom 0.3” href=”/?atom=1” />

<title>artiswork.org</title>

</head>
<body>

<div id=“wrapper”>
<div id=“insideWrapper”>

<div id=“masthead”>
</div><!—close masthead—>

</code>

Obviously, its just the top part of what I have above.
But in your page. You can output it like this:

<code>
<txp:output form=“header />
</code>

And all of the code you have in “header will be output into that tag. That helps to clean up the pages.

Hopefully that was helpful.
One of the most helpful sites I found on all of this is Danboe.net (here I have a search for you which output all the articles that mention textpattern. Dan shows you all his code and some of his css as well. He’s a nice guy too :)

Cheers,

Matthew


Offline

#4 2005-11-10 16:21:56

dada78
Member
From: New York
Registered: 2005-10-27
Posts: 138
Website

Re: Make HTML Layout Work with Textpattern

Hi Matthew!

Thank you so very much for your extensive info! That helped me a lot to understand it better!
I will aslo look at that link.
Dada

Offline

#5 2005-11-10 16:34:58

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Make HTML Layout Work with Textpattern

Dada,
No problem.
It took me awhile to get txp into my head.
Take time to read all the resources carefully. They are pretty darn good, but the best thing is to just experiment your butt off.

You’ll get there.

Matthew


Offline

Board footer

Powered by FluxBB