Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-18 16:28:45

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Using TXP as a CMS!

This is my current website: http://www.simplecandy.com/ powered by WordPress. I’m wanting to move to TXP because it just seems 10 times more powerful and I like how it doesn’t use stupid themes etc.

Basically, How do I go about creating a home page, that is the home (ie the first page you see), and then have a page with all the posts on, ie a blog page. Second, where do you store the page content? Say I have the home page, do I have the XHTML/Content in the presentation bit as a page? Or do i just create a page, and then stick all the content in an article and link the two?

Also I use quite a few images for the design, but when i upload them TXP renames them? Hence breaking the link to the CSS backgrounds etc, How do I stop TXP from doing this??? x

Thanks. x


~ Cameron

Offline

#2 2008-03-18 17:01:33

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Using TXP as a CMS!

Basically, How do I go about creating a home page, that is the home (ie the first page you see), and then have a page with all the posts on, ie a blog page.

I solved this like that: on page template assigned to defualt page (i.e. no section is selected) i placed a link to tha section “site”. And when i used tag of section listing i didn’t include default page: <txp:section list link="1" title="1" />

To prevent renaming images uploaded via txp-admin-panel link to external images, saved somewhere in your site. And i used external css file too – but if you fill more flexible to use internal css-manage system you can use rvm_css plugin


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#3 2008-03-18 22:00:43

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Using TXP as a CMS!

I have a big question, I have say created the sections for my site, ie, Home, About, Portfolio. Basically these pages have the same Header and Footer. But my q is for these pages do you post all the PHP/XHTML into the page template, or create an article for each of the sections?


~ Cameron

Offline

#4 2008-03-18 22:04:47

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Using TXP as a CMS!

Articles are separate from the XHTML. For headers and footers, simply create two forms called header and footer, and put whatever you need in those forms: Presentation > Forms (type: save as misc)

Then, in your Home/About/Portfolio page/s, use this where you want the header to be:

<txp:output_form form="header" />

Offline

#5 2008-03-18 22:19:25

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Using TXP as a CMS!

So basically, for say the about page you would just create a section called ABOUT and that would be it? What if I created an article for that section? How does that pan out!

domain.com/about/ —- This would be just a section, and all the about content stored in a page?

domain.com/about/team/ —- How would I create the team?

Last edited by driz (2008-03-18 22:28:37)


~ Cameron

Offline

#6 2008-03-18 22:32:09

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Using TXP as a CMS!

Offline

#7 2008-03-18 22:58:24

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Using TXP as a CMS!

Els wrote:

Something to read :)

Okay, just read that! But I’m still confused! Do I create an article for my about page? Or do i create a new page template for each section of my site?

In my WordPress one, I have one TEMPLATE file called page, and then all my pages use this template, and then i stick the content inside a page.


~ Cameron

Offline

#8 2008-03-18 23:21:35

oneathena
Member
From: CA, USA
Registered: 2006-02-07
Posts: 14

Re: Using TXP as a CMS!

You create a section. If all your sections have the same layout they can use the same page. if the layouts are different they should have different pages.

Offline

#9 2008-03-18 23:35:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Using TXP as a CMS!

driz wrote:

Do I create an article for my about page? Or do i create a new page template for each section of my site?

The choice is yours :-) You can do both.

Like oneathena says you can put stuff (normally layout XHTML) in Pages, assign that page to one or more sections and then any articles assigned to those sections get that layout. Anywhere there’s a <txp:body /> tag is where your article content goes.

If you only want one article in your “about” section and you want it to look different to all your other pages then feel free to write the content directly in the Page. It’s probably best to make an article though and leave Pages for the structural layout, and use Forms like jstubbs suggested to “include” repetitive information on every page across different sections (or to loop over lists).

In my WordPress one, I have one TEMPLATE file called page, and then all my pages use this template, and then i stick the content inside a page.

Same system, different naming convention. I think of a “Page” in TXP = “Template”. “Articles” are your content, assigned to a Section (which by implication has a Page layout associated with it). Forms are like snippets of re-usable stuff.

Does that help or have I made it worse? :-p

Last edited by Bloke (2008-03-18 23:36:58)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2008-03-18 23:48:02

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Using TXP as a CMS!

okay okay, so say i have a section called ABOUT! and it uses a “page” called PAGE, I need this page to basically display content in say a content DIV, so what code would I stick their? In WordPress, it was just php_thecontent or something similar.

then if i create an article, how do i make it so that its displayed inside the section and nothing else???
at the moment, if i have say about section, and an article also called about, the section itself is blank, and the article is like about/5/about??? very confused. x

e.g. – I created the section about at: http://www2.simplecandy.com/about/
but the article is at http://www2.simplecandy.com/about/5/about

Why can’t I just have the about section display one article? and not have the article hierarchical to the section

Last edited by driz (2008-03-19 00:05:56)


~ Cameron

Offline

#11 2008-03-19 00:09:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Using TXP as a CMS!

driz wrote:

okay okay, so say i have a section called ABOUT! and it uses a “page” called PAGE, I need this page to basically display content in say a content DIV, so what code would I stick their? In WordPress, it was just php_thecontent or something similar.

I’d use something like this in PAGE:

<!DOCTYPE blah blah>
<html>
<head>
  // some head XHTML, or calls to forms to populate the head
</head>
<body>
 <div id="content">
  <txp:article />
 </div>
</body>
</html>

php_thecontent is the equivalent of that call to txp:article you see there. When the page renders and it reaches that tag, it inserts the content of the currently viewed article (given in the URL). Without any parameters — as you see it there — it will read the contents of the ‘default’ Form. You’ll see that has a few tags in it for layout and one called txp:body which pulls out the body part of the article. For a list of tags check out Textbook

then if i create an article, how do i make it so that its displayed inside the section and nothing else???

When you create your article, assign it to your ABOUT section using the dropdown on the right.

the article is like about/5/about???

The layout of the permalinks on the URL line is governed by the ‘Permanent link mode’ in Admin-Preferences.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2008-03-19 01:56:10

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Using TXP as a CMS!

Okay so I have PAGE as the template and then I create an article called HOME for the HOME section!
How do I set this to be the first that the user sees?, ie become the home page.?

EDIT: If the default section is it! Then how do I get it to display the home article, that is in the home section?

Last edited by driz (2008-03-19 02:23:53)


~ Cameron

Offline

Board footer

Powered by FluxBB