Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-09-10 13:41:31
- Enor
- Member
- From: London, UK
- Registered: 2010-09-02
- Posts: 26
Editable regions
Does anyone know how to add in editable regions to a template page?
The idea is that I want to create a template for a page (section) called Services which has 6 boxes (well div’s) of text detailing the type of services that I provide, but I want to be able to update one (if not all) of the boxes now and again. How would I do that?
I could just create a static template but I would like to know how this would be achieved with the Content > Write in Textpattern. As you can only add content once in the title and body areas.
Offline
#2 2010-09-10 20:58:36
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Editable regions
Enor, I can’t tell exactly where you see the problem. Seems like you’ve not found literature about TXP (see below). So I’m talking at large to do the first step.
You’d simply put an article/article_custom tag in your page template wherever your editable content shall appear. E.g. like this:
<txp:article_custom break="div" limit="6" section="services_or_whatever">
<txp:title />
<txp:body />
<txp:custom_field name="your_custom_field_name" />
</txp:article_custom>
If this doesn’t work for you, ring the doorbell.
But also find your way into TextBook, and have a look especially at the tags at your disposal.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2010-09-10 21:03:07
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Editable regions
Enor wrote:
6 boxes (well div’s) of text […] As you can only add content once in the title and body areas.
Ah, wait! You’d have to create 6 articles in order to fill your 6 divs. Was that the problem?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#4 2010-09-11 22:35:44
- Enor
- Member
- From: London, UK
- Registered: 2010-09-02
- Posts: 26
Re: Editable regions
Hi Uli
Thanks for replying back to my message.
I haven’t gone through Textbook but have just been playing about with the CMS and wanted to throw out a few questions first before I delve more deeper to make sure it’s the right CMS for the job that I want to do.
Will give you a bell if your suggestion doesn’t work though :)
Offline
#5 2010-10-01 14:41:47
- operator
- New Member
- Registered: 2010-09-30
- Posts: 1
Re: Editable regions
Hey everybody,
I have a question and I hope you can answer me. I did a lot of searches (forum & Textbook) but couldn’t find a solution.
Anyway, I made a website for a client and intend on using TextPattern for the CMS. I want him to be able to edit the text on the website. The website has 6 pages, 5 of which need to be editable. Only the text should be editable, not the rest.
The pages themselves have a fairly simple XHTML. Check out this code below. This is jus an example, it is not the exact code I’m using. Let’s call this page1.php:
———————
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en”>
<head>
<title>Page 1</title>
<link href=”/css/style.css” rel=“stylesheet” type=“text/css” />
<link rel=“shortcut icon” type=“image/x-icon” href=”/favicon.ico”>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” />
</head>
<body>
<div id=“header”> </div> <div id=“container_main”> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultricies libero sit amet mi laoreet in imperdiet nunc mollis. Etiam nec tortor ac sapien lobortis viverra in sed sapien. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc et metus nunc, quis gravida massa. Etiam nulla erat, semper sed luctus at, posuere non felis. Aenean hendrerit sem nec elit condimentum mattis. Curabitur elementum sollicitudin orci vitae euismod. </div> <div id=“footer”></div></body>
</html>
———————
See that Lorem Ipsum text? I want the client to be able to edit that text.
[b]So my question is: how do I get the text of page1.php to page5.php to show up in TextPattern?[/b]
What might be possible as well, and maybe easier, is if I make seperate .php files containing only the text of the pages, and then include the text using PHP includes.
Does anybody know how to do this in TextPattern? Thanks.
Offline
#6 2010-10-01 14:55:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Editable regions
We have a couple of good tutorials. Start here: http://textbook.textpattern.net/wiki/index.php?title=Category:Orientation
Offline
Pages: 1