Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-07-15 16:50:07

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Could be crazy - but multiple body fields

So, as a front-end person, and also wanting to develop sites that my customers can easily use, and this could be a crazy idea but..

You know the way say I have a single article, and I can style the excerpt differently to the body tag which can be very handy.. and nowadays with html5 you might use multiple section tags and containers that you want text content inside. So instead of having something made where you post multiple articles and amalgamate on the page, could you have a single article with multiple ‘body’ fields, a bit like custom fields.. but more legible and uses textile.

You could name them or have a pre-made name, but could refer to them with a simple tag like <body2 />

It could revolutionize how single pages are coded.

So I can have <section><container><body /></container></section> then <section><container><body2 /></container></section> etc.

What do you think? It could be crazy talk now so no offense if it is. But it would be soooooo handy too though!! :D

I think you would have to be able to generate these on the fly depending how many were needed.


…………………
I <3 txp
…………………

Offline

#2 2019-07-15 17:07:49

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: Could be crazy - but multiple body fields

Also being able to associate more article images linked to each new body field.. so if a second body field was added, then a second article image field appears to match.. so you can have multiple text contents being output with their own image to illustrate..


…………………
I <3 txp
…………………

Offline

#3 2019-07-15 22:48:51

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: Could be crazy - but multiple body fields

so, you mean basically unlimited custom fields, one (or more) being second (third,…) <txp:body /> field?

That is already in the works, maybe for TXP.next or TXP.next.next.

Or you can probably do that now with the unlimited custom fields plugin (here).

Assuming I understand you correctly.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2019-07-16 18:55:11

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: Could be crazy - but multiple body fields

phiw13 wrote #318744:

so, you mean basically unlimited custom fields, one (or more) being second (third,…) <txp:body /> field?

That is already in the works, maybe for TXP.next or TXP.next.next.

Or you can probably do that now with the unlimited custom fields plugin (here).

Assuming I understand you correctly.

Custom fields could work if they were textareas so that you could see 2-3 paragraphs typed in, and also textile friendly.. you’d need to move it into the centre area I think too so that you had the wider width available..

Could be a plugin I’m describing to be fair!


…………………
I <3 txp
…………………

Offline

#5 2019-07-16 22:20:51

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: Could be crazy - but multiple body fields

  • the custom fields plugin I linked above can already do that. And, while those fields will not use Textile by default, it can be nudged to do it. Look at the escape attribute (docs).
  • and Yes, this is exactly what is in the works for a Textpattern.next.

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#6 2019-07-17 09:28:00

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Could be crazy - but multiple body fields

hilaryaq wrote #318739:

I think you would have to be able to generate these on the fly depending how many were needed.

That’s a point we have to solve yet in custom-fields branch. Currently cf sets are user-predefined and tied to sections iirc.

Offline

#7 2019-07-17 10:48:17

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: Could be crazy - but multiple body fields

phiw13 wrote #318769:

  • the custom fields plugin I linked above can already do that. And, while those fields will not use Textile by default, it can be nudged to do it. Look at the escape attribute (docs).
  • and Yes, this is exactly what is in the works for a Textpattern.next.

Very cool, I must play around with that plugin thanks for the tip!


…………………
I <3 txp
…………………

Offline

#8 2019-07-17 10:51:23

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: Could be crazy - but multiple body fields

etc wrote #318773:

That’s a point we have to solve yet in custom-fields branch. Currently cf sets are user-predefined and tied to sections iirc.

Would be great, but even generating manually if they were large textareas under the body field instead of a small textfield to the side, you could use them for all sorts of real content, at the moment they are great for gallery id number lists, or single lines.. but being able to use them for paragraphs of content would be a game changer, you could use the next field then to refer to an image id to attach to the content and have a nice page with alternate content and images really easily :)


…………………
I <3 txp
…………………

Offline

#9 2019-07-17 11:46:42

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Could be crazy - but multiple body fields

Yep, adding more textiled textarea fields is planned and possibly already working in custom-fields branch. The difficulty is to add/remove them “on the fly”, at authors will. I mean, if some section is set to have three bodies, all articles of this section will have 3 bodies. If you need to add a 4th body to some article, you have to modify the section cf set or create a new section. UX wise that’s not ideal, I guess.

But couldn’t you use multiple articles attached (via a cf) to a “parent” article instead?

Offline

#10 2019-07-17 20:03:51

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: Could be crazy - but multiple body fields

etc wrote #318782:

Yep, adding more textiled textarea fields is planned and possibly already working in custom-fields branch. The difficulty is to add/remove them “on the fly”, at authors will. I mean, if some section is set to have three bodies, all articles of this section will have 3 bodies. If you need to add a 4th body to some article, you have to modify the section cf set or create a new section. UX wise that’s not ideal, I guess.

But couldn’t you use multiple articles attached (via a cf) to a “parent” article instead?

That sounds great! I could I’m just so wary of paths in sitemaps etc, but if you didn’t use the packaged rss for anything and made sure that multiple article urls aren’t being picked up by Google that could work..


…………………
I <3 txp
…………………

Offline

Board footer

Powered by FluxBB