Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2019-10-14 16:21:12

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: RFC: design out the archive page template in the default theme

Didn’t I send you the plan doc? If not, let me know and I’ll share it.

The plan was to run them side by side. A clean break. So existing sites just carry on working, but on upgrade all current cats are “copied” to the tag table so the new suite of <txp:> tags that accompany them are available out of the box for anyone who wants to swap out their <txp:category...> tags and start to use them.


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

Online

#26 2019-10-14 19:44:31

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

Re: RFC: design out the archive page template in the default theme

Bloke wrote #319708:

Didn’t I send you the plan doc? If not, let me know and I’ll share it.

Ah, you did, sorry, but I had a poor internet connexion at that moment. Will read now.

Anyway, a commit is in dev now, it works along these lines, testers welcome.

A related question is the search by category. Suppose we have a category tree like

animals
|- mammals
|  |- cats
|  |- dogs
...

If a Garfield article is categorized as cats and we are searching for animals, should Garfield be returned too? This would mean that we don’t really need to associate two different categories on the same path to an article.

Offline

#27 2019-10-15 09:00:26

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 553

Re: RFC: design out the archive page template in the default theme

Bloke wrote #319701:

category1/2 will be retired one day in favour of unlimited cats/tags.

Whoop! Whoop! This makes me very happy as I’m always banging my head against the two category limit.

Offline

#28 2019-10-20 08:09:59

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

Re: RFC: design out the archive page template in the default theme

etc wrote #319712:

A related question is the search by category. Suppose we have a category tree like

animals...

If a Garfield article is categorized as cats and we are searching for animals, should Garfield be returned too? This would mean that we don’t really need to associate two different categories on the same path to an article.

I’m returning to respond to this one. I guess that it depends on the templates. I’m all for a deeper classification. Consider /animals/mammals/cats/etc/.

/animals/ could only return a category list of animals. ie Mammals, Actinopterygii, Chondrichthyes, Birds, Amphibians, Reptiles.

/mammals/ could return cats, dogs, elephants, etc

clicking on cats could take us to Lions, Tigers, domestic cats, etc

domestic cats could return Siamese, Sphynx, Burmese, etc

From there on, we can have a list of available Siamese cats in individual articles.

I am aware that google no longer cares for this kind of taxonomies in their results but they are useful nevertheless in structural and usability terms.

If sections will eventually be totally divorced from the url structures, we have to discuss other ways to create semantically correct taxonomies within sites using clean urls.

The one thing I have a problem with the above is some of the real world cases. ie. a list of articles by an author (not in the txp sense but maybe using custom_field) who contributed both in the cats and dogs taxonomy. This is of course possible using the current txp releases but the issue here is that part of the page content breaks the actual taxonomic division.

I realise that the issues I am raising may require radical changes in txp but it will also make it even more flexible.


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

Offline

#29 2019-10-20 09:05:58

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

Re: RFC: design out the archive page template in the default theme

colak wrote #319788:

Consider /animals/mammals/cats/etc/.

/animals/ could only return a category list of animals. ie Mammals, Actinopterygii, Chondrichthyes, Birds, Amphibians, Reptiles.

/mammals/ could return cats, dogs, elephants, etc

clicking on cats could take us to Lions, Tigers, domestic cats, etc

domestic cats could return Siamese, Sphynx, Burmese, etc

From there on, we can have a list of available Siamese cats in individual articles.

That’s already done in dev via a new <txp:article depth /> attribute (name to debate). By default, landing on animals/ returns animals. But if you set depth="1" you’ll get its children (mammals etc). If you wish, you can bound depth between two values: depth="0-2" will give you animals with its children and grandchildren. Valueless depth matches all descendants of animals.

If sections will eventually be totally divorced from the url structures, we have to discuss other ways to create semantically correct taxonomies within sites using clean urls.

Currently all clean modes recognize /section/title urls, it would be difficult to remove for legacy reasons.

The one thing I have a problem with the above is some of the real world cases. ie. a list of articles by an author (not in the txp sense but maybe using custom_field) who contributed both in the cats and dogs taxonomy. This is of course possible using the current txp releases but the issue here is that part of the page content breaks the actual taxonomic division.

Not sure to understand you: would this do?

<txp:article_custom my_author="darwin" category="cats, dogs" />

Offline

#30 2019-10-20 16:58:44

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

Re: RFC: design out the archive page template in the default theme

etc wrote #319789:

That’s already done in dev via a new <txp:article depth /> attribute (name to debate). By default, landing on animals/ returns animals. But if you set depth="1" you’ll get its children (mammals etc). If you wish, you can bound depth between two values: depth="0-2" will give you animals with its children and grandchildren. Valueless depth matches all descendants of animals.

Will this be reflected in the URL structure?

Currently all clean modes recognize /section/title urls, it would be difficult to remove for legacy reasons.

I agree. I’m just trying to think way ahead!

Not sure to understand you: would this do?

<txp:article_custom my_author="darwin" category="cats, dogs" />...

Indeed it works. I was thinking too strictly regarding what an article page should contain rather than txp’s possibilities.


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

Offline

#31 2019-10-20 20:29:03

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

Re: RFC: design out the archive page template in the default theme

colak wrote #319790:

Will this be reflected in the URL structure?

What exactly? Nope for depth attribute, since it works in any permlink mode and has no correlation with URL. But there are two new modes – section/category/title and more verbose breadcrumb/title – that reflect the category paths.

Offline

Board footer

Powered by FluxBB