Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-13 20:59:35

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

How do I add another content box on the Write tab?

On the public side of the site I am developing, the client wants an area of the sidebar to be editable from within the TXP Write tab, in addition to the regular article body. This area in the sidebar will change depending on which article is displaying, so I can’t just do a simple include.

I could add a custom field, but there are two drawbacks to this:

  1. The default custom field input box is tiny
  2. Custom fields have a limit of 255 characters.

Any ideas?

Offline

#2 2008-02-13 22:14:45

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: How do I add another content box on the Write tab?

are you already using the excerpt area? if so, then you’re probably out of luck. this is where xpattern would eventually come into play.

i never understood why only 10 custom fields made it into txp core, and why only an arbitrary amount of 2 categories are allowed per article out of the box. seems a lot of half-assed ‘solutions’ were thrown into TXP (no offense to the current devs)

Offline

#3 2008-02-13 22:16:02

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

Re: How do I add another content box on the Write tab?

  1. You can change the size of the input area by adding for example input#custom-1 {height: 100px;} to textpattern.css edit: sorry, changing the height still won’t let you enter more than 1 line in there, that would require changing ‘input’ to ‘textarea’, but somehow I don’t think you can do that without consequences… :(
  2. In phpMyAdmin, you can change the field type from varchar (255) to text.

Last edited by els (2008-02-13 22:35:13)

Offline

#4 2008-02-13 22:20:02

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: How do I add another content box on the Write tab?

iblastoff wrote:

i never understood why only 10 custom fields made it into txp core, and why only an arbitrary amount of 2 categories are allowed per article out of the box. seems a lot of half-assed ‘solutions’ were thrown into TXP (no offense to the current devs)

Dean did a good job at the time, without his efforts txp/xpat wouldn’t exist.

Offline

#5 2008-02-13 22:44:52

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

Re: How do I add another content box on the Write tab?

Els suggestion 2 enables you to add more than 255 chars. If you’re not afraid of making some minor modifications to the core, there’s instructions in this thread on how to change the input tag for the custom field into a textarea tag. I’ve done that before quite successfully.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2008-02-13 23:23:48

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: How do I add another content box on the Write tab?

@iblastoff – yes, already using the excerpt area. I think that’s limited to 255 also.

@Els and jakob – thanks for the suggestions, I’ll check them out!

Offline

Board footer

Powered by FluxBB