Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-01-14 15:03:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,883
Website

Re: Required fields on Sections pane

etc wrote #321087:

Actually, style could be optional?

With the recent functionalities which allow a section to be used for an xml sitemap, and other purposes, I think that attaching a style should be optional.


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

#12 2020-01-14 22:45:08

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,970
Website

Re: Required fields on Sections pane

colak wrote #321096:

With the recent functionalities which allow a section to be used for an xml sitemap, and other purposes, I think that attaching a style should be optional.

Yeah, good point, it is confusing as well.

–~–~–

Oleg, your latest patch seems to do what you describe above (light testing so far). And now that empty entry in the select on the Edit panel does make sense again. TY.

Offline

#13 2020-01-15 10:24:35

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

Re: Required fields on Sections pane

I’m feeling like opening a Pandora box here, but since pageless sections are allowed (by mistake?) in 4.7, we can not simply forbid them in 4.8. Instead the patch you cite excludes them (by default) from sections and articles lists. You can still access their content explicitly setting section or id attributes, just mind that their URL will land you on ‘unknown section’ 404.

This makes it possible to publish e.g. book-type articles containing many ‘pageless’ chapters included via <txp:article_custom /> tag.

Offline

#14 2020-01-15 10:35:47

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,809
Website

Re: Required fields on Sections pane

etc wrote #321105:

I’m feeling like opening a Pandora box here, but since pageless sections are allowed (by mistake?) in 4.7, we can not simply forbid them in 4.8. Instead the patch you cite excludes them (by default) from sections and articles lists. You can still access their content explicitly setting section or id attributes, just mind that their URL will land you on ‘unknown section’ 404.

This makes it possible to publish e.g. book-type articles containing many ‘pageless’ chapters included via <txp:article_custom /> tag.

So, this is akin to what we were talking about before, but using ‘pageless’ rather than ‘themeless’ or ‘non-url permlink schemes’? I think your suggestion sounds more logical, and ‘pageless’ means they are effectively also ‘url-less’ too. Out of interest, what would happen if you plugged them into the url? A 404?

I like the idea. Removing them from processing using txp:article (if they’re ‘url-less’ they would never define context) and in automatic section_list lists makes sense to me. Being able to explicitly output them via section="pageless-section-name" or id="{article-ids-from-pageless-section}" makes them usable wherever one needs them.

Will test as soon as I can…

EDIT: Oh, and thank you!


TXP Builders – finely-crafted code, design and txp

Offline

#15 2020-01-15 10:57:41

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

Re: Required fields on Sections pane

I’m gonna play too later today, thank you. This looks like a terrific (even if its origins are slightly inadvertent!) addition to officially support pageless sections.


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

#16 2020-01-15 12:29:11

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,970
Website

Re: Required fields on Sections pane

etc wrote #321105:

I’m feeling like opening a Pandora box here, […]

jakob wrote #321106:

So, this is akin to what we were talking about before, but using ‘pageless’ rather than ‘themeless’ […]

Ooh, this is growing beyond expectation. It does sounds intriguing though. I start (baby-baby steps) to understand what Jacob alluding to, I think, so this makes it interesting. I will try to play with it.

Offline

#17 2020-01-15 13:21:28

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

Re: Required fields on Sections pane

jakob wrote #321106:

So, this is akin to what we were talking about before, but using ‘pageless’ rather than ‘themeless’ or ‘non-url permlink schemes’? I think your suggestion sounds more logical, and ‘pageless’ means they are effectively also ‘url-less’ too.

Yes, that’s an easy way to create ‘items’. Not sure it’s a right way since it also creates exceptions, but I’m more or less convinced that the ‘right’ implementation would break bw compatibility.

Out of interest, what would happen if you plugged them into the url? A 404?

Yes, even index.php?id=34 would result in 404. Txp needs a page to parse content.

Bloke wrote #321108:

This looks like a terrific (even if its origins are slightly inadvertent!) addition to officially support pageless sections.

We should think twice, I would rather see it as a hack à la accessing status via <txp:custom_field /> atm.

Offline

#18 2020-01-15 14:13:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,883
Website

Re: Required fields on Sections pane

etc wrote #321115:

see it as a hack à la accessing status via <txp:custom_field /> atm.

I’m all for documenting the undocumented custom_fields as part of the core:)


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

#19 2020-01-15 14:20:15

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

Re: Required fields on Sections pane

I’m fine with keeping it as a hack, or exposing it as a feature – either now, or when we think it’s mature enough to not be a hack any more.

As for the custom fields hack, that’s so handy – especially with the new global attributes – that I’m in no hurry to remove it. In fact, it’s still allowed in the upcoming custom fields branch.


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

#20 2020-01-15 22:28:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,970
Website

Re: Required fields on Sections pane

+1 on Colaks suggestion of exposing/publicising/documenting the <txp:custom_fields /> hack more broadly as it is very handy.

But this particular hack or feature to use page-less sections, can we keep that “secret“ and officially unsupported to allow a bit of testing and maturing? I assume here that you plan to release TXP 4.8 soonish.

Offline

Board footer

Powered by FluxBB