Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-10-09 11:44:05

DanV
New Member
Registered: 2007-10-09
Posts: 3

Which files to alter in a new layout?

I have been looking around to figure out which files I need to alter to create my own design – apart from the styles, that is.

I haven’t found any typical “header” or “footer” or “content” anywhere. I would very much appreciate a hint or two……

Cheers,
Dan

Offline

#2 2007-10-09 12:13:10

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: Which files to alter in a new layout?

Check your page templates ( presentation tab > pages ) to see the HTML code for the pages for your different sections (specified in presentations > sections). Depending on how your page setup is defined, you can define elements that repeat for all pages of a section or the site as code snippets in forms (presentations > forms) and then link to these from your page template using txp:output_form (check the textbook). Then if you want to change that element across the whole site, just change the form in question.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2007-10-09 14:16:10

DanV
New Member
Registered: 2007-10-09
Posts: 3

Re: Which files to alter in a new layout?

Thanks a bunch! Good start.

But I’m still a bit confused. For instance, it requires me more or less to work on a whim. How do I apply various style sheets? How can I develop a design in e.g. Dreamweaver and use? What’s the best practice/workflow to set up a new design without working with the TP interface? Can I e.g. work right away in DW with any TP files?

E.g., if I copy the code in the default template into a DW file and edit there and create a new style sheet to go with the new design, how/where do I attach the style sheet in the TP interface?

I’m pretty experienced in html and css, so shoot….. :-)

Cheers,
Dan

Last edited by DanV (2007-10-09 14:18:20)

Offline

#4 2007-10-09 18:23:29

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: Which files to alter in a new layout?

txp doesn’t take a building block approach to a page, e.g. a header bit, a main column, a sidebar, a footer etc. like some other CMSs do. Instead you are entirely to free to make the page how you like, which is what makes it so flexible. I suggest you read this article on txp and the two articles by destry wion linked at the end of that article. They’re quite long, but after that you’ll have a better idea of how txp works.

Sure, you can design individual page templates in Dreamweaver with your own css file. While you do it, think about how you would structure your site – what it should show you on the front page, on a section landing page, for an individual article, etc. and then style templates for these. If different parts of the site have a different page structure entirely, do this for each part/section of the site. You can also break down parts of the page such as the head, the footer, an individual article view (e.g. big pic plus full text), an article list repeating element (e.g. mini-pic plus excerpt) etc. and stick these in forms (presentation > forms tab).
When you port your page template from DW back over to txp, you need to drop in the txp:tags for the relevant bits of the page, e.g. for the page title, for the css stylesheet, forms for how an individual article should be displayed as well as a form for how a repeating list of articles should show, etc. That will all make more sense once you’ve read those articles :-)

You can add your own stylesheets via the presentation > styles tab > Create new > save with your name. In the presentation > section page you can assign which css file and which page template should be used for each section (you just need to have the txp:css tag in your header (see the default page template for how it works).


TXP Builders – finely-crafted code, design and txp

Offline

#5 2007-10-09 20:10:52

DanV
New Member
Registered: 2007-10-09
Posts: 3

Re: Which files to alter in a new layout?

Thank you, Jakob!

Offline

Board footer

Powered by FluxBB