Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2020-01-16 12:48:58

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

Re: Required fields on Sections pane

Late here, as I’ve been heads down in docs. And I can’t say I exactly follow what has been decided or done at this point in discussion. But I’ve just been working feverishly on this section of the themes doc, and while I was running through functionality in the demo site to prepare that walk-through and images, I discovered that you could, in fact, choose the blank option in the new sections editor, and that was a wonderful discovery, IMO, because then when you setup a theme development environment, notably a reasonably large one like that walk-through demos, it makes it really easy to see where assets need to be assigned when setting the environment up.

Of course, that scenario is only for theme development situations where one is changing the architecture from whatever state a site is currently in, but I think the ability to do that — select blank assets on new sections — is a boon not to lose in that case.

If that has been changed since working on it yesterday, I’ll have to edit that doc, yet again, change all the images, and consider biting my cyanide tooth. (You have no idea.)

Offline

#22 2020-01-16 13:04:04

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

Re: Required fields on Sections pane

I’m not quite done editing and combing through the themes document yet, but I might as well now invite anyone thinking of creating or using a theme, to please give the document a read and trial run when you have the time, and let me know what is helpful and what is still confusing. That includes technical accuracy, devs.

The structure and sections labels might juggle around a bit more as I continue to make a stronger narrative through it while dividing it up for different audiences, but the bulk of it is in place for 4.8.

Offline

#23 2020-01-16 20:26:09

etc
Developer
Registered: 2010-11-11
Posts: 3,788
Website

Re: Required fields on Sections pane

Destry wrote #321125:

If that has been changed since working on it yesterday, I’ll have to edit that doc, yet again, change all the images, and consider biting my cyanide tooth. (You have no idea.)

No worries, comrade, blank options are still there and getting fun. Blank pages produce kinda ‘hidden’ sections/articles that can be used as ‘parts’ of other articles. Think of book chapters or multilingual articles etc. And mucho thanks for your hard work!

Offline

#24 2020-01-16 22:02:05

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

Re: Required fields on Sections pane

etc wrote #321146:

Blank pages produce kinda ‘hidden’ sections/articles that can be used as ‘parts’ of other articles. Think of book chapters or multilingual articles etc.

Book chapters, eh? That sounds really good.

And mucho thanks for your hard work!

Thank you. I’m just helping to pave the way for that mob of theme designers chomping at the bit. 👀

Offline

#25 2020-01-17 21:22:56

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,674
Website

Re: Required fields on Sections pane

Blank pages produce kinda ‘hidden’ sections/articles that can be used as ‘parts’ of other articles. Think of book chapters or multilingual articles etc.

that is interesting! Would it still be easy to mange where one has many chapters?
Also how does one spilt up the Chapter where one may have many Sections and Sub-Sections? i.e. how deep can one split-up the chapter?


…. texted postive

Offline

#26 2020-01-17 21:47:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,648
Website

Re: Required fields on Sections pane

bici wrote #321201:

Would it still be easy to mange where one has many chapters?

There’s no hierarchy as such. If you were publishing a book chapter by chapter, you may actually want each chapter to have its own URL for searchability and to be able to serialise it or to let people jump to a particular chapter.

But if you wanted to write it in chapters (where one chapter = one article) but only have a single entry point for visitors, you could thread all the chapters together from there into a single document and have them not have individually-addressable URLs. If so, this feature is for you.

To set this up, you could make example.org/books/book-title a regular article. In its Body text you might then ‘chain’ the chapters together:

<txp:article_custom section="chapters" limit="99">
   <txp:title />
   <txp:body />
</txp:article_custom>

Done. One big article. All your chapters streamed together. If you had a whole load of different books and chapters in that section, you might segregate them by category. Perhaps the category matches the book title (the article url-title in this case):

<txp:variable name="book_name"><txp:article_url_title /></txp:variable>
<txp:article_custom section="chapters" category='<txp:variable name="book_name" />' limit="99">
   <txp:title />
   <txp:body />
</txp:article_custom>

Boom, done.

The upshot is that you can string together all related chapters (articles) into one long document but only present a single endpoint to users. If you typed ‘example.org/chapters/chapter-1’ for example, you’d get a 404. Anything in the ‘chapters’ section is unaddressable as Txp can’t render anything if there’s no page attached to it. You can only pull content into other articles / forms / pages from “pageless sections” via <txp:article_custom> or URL skulduggery (see Oleg’s example below).

That’s not the only application. You can store bio text or event / venue details or contact information in pageless sections and call that content into your regular articles when you need it. Think of pageless sections as silos of includeable information, much like Forms are to Pages. But the crucial thing is that you can give editors responsibility for this content’s upkeep instead of having to write the snippets in either: a) regular articles that have URLs you wish to not be directly accessible, or b) Forms that not all content editors are given access.

Does that help at all?

Last edited by Bloke (2020-01-17 21:54:18)


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

#27 2020-01-17 21:52:30

etc
Developer
Registered: 2010-11-11
Posts: 3,788
Website

Re: Required fields on Sections pane

bici wrote #321201:

that is interesting! Would it still be easy to mange where one has many chapters?
Also how does one spilt up the Chapter where one may have many Sections and Sub-Sections? i.e. how deep can one split-up the chapter?

Pageless sections/articles are just not directly accessible via their URL and hidden (by default) from txp section/article tags. As usual with txp, there is no rigid inbuilt ‘hierarchy’ functionality. Rather, you have the full freedom to attach them to some ‘parent’ article via, say, a custom field and output their content within their parent.

I’ve ‘written’ a three-chapters test book and a multilingual article to illustrate the concept. The construction is quite simple, yield if interested.

Offline

#28 2020-01-17 22:05:02

etc
Developer
Registered: 2010-11-11
Posts: 3,788
Website

Re: Required fields on Sections pane

Bloke wrote #321204:

But the crucial thing is that you can give editors responsibility for this content’s upkeep instead of having to write the snippets in either: a) regular articles that have URLs you wish to not be directly accessible, or b) Forms that not all content editors are given access.

c) Pageless sections/articles can be made searchable via the standard txp q query. You’ll have, however, tweak the search results form to point their URL to their parent.

Offline

#29 2020-01-18 05:18:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,189
Website

Re: Required fields on Sections pane

etc wrote #321206:

I’ve ‘written’ a three-chapters test book and a multilingual article to illustrate the concept. The construction is quite simple, yield if interested.

that is really cool!!!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#30 2020-01-18 07:14:54

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,055
Website

Re: Required fields on Sections pane

etc wrote #321206:

I’ve ‘written’ a three-chapters test book and a multilingual article to illustrate the concept.

That multi-lingual article is quite cool.

The construction is quite simple, yield if interested.

Me waves ~


Where is that emoji for a solar powered submarine when you need it ?

Offline

Board footer

Powered by FluxBB