blueprint
categories:
label: Categories
type: structure
fields:
autoid:
type: hidden
translate: false
cat_title:
label: Title
type: text
site.txt
Categories:
-
cat_title: new
autoid: r8hqec1g
-
cat_title: cool
autoid: 58lfd99u
-
cat_title: project
autoid: 6uewjsbp
The following code doesn’t seem to work anymore on kirby 3.5.
I use the latest autoid-plugin.
$categories= site()->categories()->toStructure()->filterBy('autoid','58lfd99u');
echo count($categories) gives 0;
But following code works on the ‘cat_title’
$categories= site()->categories()->toStructure()->filterBy('cat_title','new');
echo count($categories) gives 1;