Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-07-05 06:44:51

code365
Member
From: California
Registered: 2009-08-16
Posts: 110
Website

Any Plans for creating more <txp:body/> without using custom.

Hi,

First I want to say TXP is an awesome CMS and the people behind this application. The community always provides solutions to my projects. With that said, I want to know if any plans for more <txp:body/> will be added to the new txp?

Thank you

Offline

#2 2018-07-05 09:34:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: Any Plans for creating more <txp:body/> without using custom.

code365 wrote #312854:

Hi,

First I want to say TXP is an awesome CMS and the people behind this application. The community always provides solutions to my projects. With that said, I want to know if any plans for more <txp:body/> will be added to the new txp?

Thank you

What do you have in mind?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2018-07-05 18:27:35

code365
Member
From: California
Registered: 2009-08-16
Posts: 110
Website

Re: Any Plans for creating more <txp:body/> without using custom.

1. Any way to add more body section to txp, because I have clients who like txp but say anyway to add more, not at this point. Also, How can I help txp?

Last edited by code365 (2018-07-05 18:28:57)

Offline

#4 2018-07-05 20:35:12

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Any Plans for creating more <txp:body/> without using custom.

In case you need to be able to add more text to the body field you can alter the text type (“currently mediumtext”) of the body column in the textpattern table in the database, if that’s what you mean.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2018-07-05 21:15:55

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

Re: Any Plans for creating more <txp:body/> without using custom.

Or if you mean adding further text entry boxes like txp:body, you can use custom fields and glz_custom_fields (set your custom field to be a textarea) along with the new escape="textile" attribute in txp 4.7 (see here):

<txp:custom_field name="your_field" escape="textile" />

And if you’re using an earlier version of txp, previous versions of glz_custom_fields (see note at the top of the link above) also support textarea custom fields, and you can use smd_wrap to process textile in a custom field:

<txp:smd_wrap transform="textile"><txp:custom_field name="your_field" /></txp:smd_wrap>

TXP Builders – finely-crafted code, design and txp

Offline

#6 2018-07-10 11:37:50

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Any Plans for creating more <txp:body/> without using custom.

I’m pretty sure what he’s talking about is ‘unlimited custom field’ (UCF) functionality (textarea field types) — similar to what Jakob is saying but core — so that you can design any content type imaginable based on a ‘chunking’ model, as opposed to the old ‘body blob’ metaphor, which old systems like Txp are often pointed at by content strategists as doing it wrong. (Please don’t get emotional and jump to Txp’s defense. I love it.)

The blob situation is classically identified by having to add blocks of specific code in the body or embed tags that insert those blocks from forms, which are not ideal for that anyway, or they become very unwieldy too.

It will be a glorious day when Txp functions by more of a ‘chunked’ model. It’s close, but not all the way there. Too many components still must be lumped into the body field making it a bit unwieldy and limited for much beyond the basic article.

As one example, a book model, or large report, one needs the freedom to build by components, which then assembles into a single publication when compiled:

  • Title
  • Subtitle
  • Preface (e.g. excerpt)
  • ToC
  • Chapter 1
  • Chapter 2
  • etc
  • Endnotes
  • Bibliography
  • Appendix (the break)
    • Appendix A: List of Figures
    • Appendix B: etc
    • etc

And that’s not even inclusive of all possible text components in a large publication.

And there could be any number of other content types having their own complex structure needs.

One unfortunate problem I see with certain Textile features in the eventual UCF functionality is in the case of footnotes/endnotes, which is a huge feature of PHP Textile. As it is now you can’t put notes in the excerpt and have them render in the body, so I’m guessing the problem is multiplied in a UCF situation. Unless Textile can be compiled across all the chunks, it will have to be straight HTML for certain things at that point, and that, in my opion, will make chunking and separation of presentation from field content even more important.

Or taking the idea even further, you don’t even use markup in the fields at all, text only, and the markup is applied at the field level some how. That’s pretty advanced, though, and maybe makes Textpattern too complicated for the average user. Jumps into the component content management category.

Offline

#7 2018-07-10 16:15:26

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

Re: Any Plans for creating more <txp:body/> without using custom.

Destry wrote #312938:

Unless Textile can be compiled across all the chunks … Or taking the idea even further, you don’t even use markup in the fields at all, text only, and the markup is applied at the field level some how.

I guess you could do a variant of that at the present:

  • use glz_custom_fields and textarea custom fields to add more content input blocks to the main column. glz_custom_fields automatically adds textareas to the main column.
  • set body to no markup but write in textile as normal. This should prevent it pre-textiling that block.
  • write in each custom field using textile
  • output them all in your page template or form as follows:
<div class="content">
    <txp:smd_wrap transform="textile">
        <txp:body />

        h3. Subhead A

        <txp:custom_field name="block_a" />

        h3. Subhead B

        <txp:custom_field name="block_b" />

        h3. Subhead C

        <txp:custom_field name="block_c" />
    </txp:smd_wrap>
</div>

By not textiling each block individually, and textiling the whole lot together, your footnotes should work across them all. You may need to use smd_wrap_all instead of …@smd_wrap@ (I forget when to use which).

Finally, to reduce load on the server, it’s probably a good idea to use etc_cache or aks_cache to cache the generated textile block. Both plugins work very well.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2018-07-10 17:29:23

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Re: Any Plans for creating more <txp:body/> without using custom.

Unless Textile can be compiled across all the chunks

Hi Destry,

Jakob solution is great, but lose BDD body_html catching.
I use “body + except” in one Textile compilation with this etc plugin
You can adapt this plugin to add some CF. But you need create 2 CF; one for textile and one for compiled html: CF & CF_html
In fact, I don’t know if stored a compiled version in BDD still relevant for performance.

Offline

#9 2018-07-11 09:38:03

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Any Plans for creating more <txp:body/> without using custom.

jakob wrote #312952:

I guess you could do a variant of that at the present

That’s awesome stuff. I wonder how forward compatible this kind of investment will be with core UCFs though. I’d hate to have to refactor big articles after Txp 5.0, or whatever.

Then again, maybe with 4.7 out the door, Bloke has run for the hills. ;)

sacripant wrote #312953:

You can adapt this plugin to add some CF. But you need create 2 CF; one for textile and one for compiled html: CF & CF_html

Thanks for the heads up.

Offline

#10 2018-07-13 04:11:10

code365
Member
From: California
Registered: 2009-08-16
Posts: 110
Website

Re: Any Plans for creating more <txp:body/> without using custom.

I want to thanks everyone for their comments and ideas. You guys are awsome.

Offline

Board footer

Powered by FluxBB