The Kirby Related Pages plugin provides a page method that fetches related pages based on the number of matches in a given field. You can set a minimum number of required matches. The result is sorted by number of matches.
No, it’s only intended for fields that contain entries separated by a delimiter. How would you expect that to work, could you give me an example, like search in a field within the structure field, or in all fields of a structure field?
For example, if I have some “project” subpages (parent page is “projects”) for an agency portfolio and in a project there is a structure field to list all the people who were involved in this project.
This structure field has tree fields: name, department, occupation.
In the parent page “Projects” may I fetch all the projects ( = children “project”) which the department = “design” and occupation = “webdesigner”
Maybe I misunderstood how your plugin works, with my bad english sometime it’s happened
I was using you wonderful plugin on my personal portfolio site. In the moment I’m rebuilding my whole site with Kirby 3. And i really love it how it works out.
have you planned to update your plugin for kirby 3? Because unfortunately it seems to not working any longer.
I know we have the “related field” now. And I’m using this one as well but what i miss, is the possibility to filter a field for matches how you did it in the related pages plugin.
@obear A first version of the updated plugin is now on GitHub. Probably needs some cleaning up and I haven’t tested if it works in a multi-lang environment yet.
I have, however, extended the functionality to work for files as well.
Whoops\Exception\ErrorException thrown with message "Array to string conversion"
Stacktrace:
#12 Whoops\Exception\ErrorException in [..]/site/plugins/kirby-related/src/Related.php:92
#11 Whoops\Run:handleError in [..]/site/plugins/kirby-related/src/Related.php:92
#10 Texnixe\Related\Related:getRelated in [..]/site/plugins/kirby-related/index.php:29
#9 Kirby\Cms\Page:{closure} in [internal]:0
#8 Closure:call in [..]/kirby/src/Cms/HasMethods.php:25
#7 Kirby\Cms\Page:callMethod in [..]/kirby/src/Cms/Page.php:168
#6 Kirby\Cms\Page:__call in [..]/site/templates/color.php:50
#5 require in [..]/kirby/src/Toolkit/Tpl.php:39
#4 Kirby\Toolkit\Tpl:load in [..]/kirby/src/Cms/Template.php:164
#3 Kirby\Cms\Template:render in [..]/kirby/src/Cms/Page.php:1105
#2 Kirby\Cms\Page:render in [..]/kirby/src/Cms/App.php:516
#1 Kirby\Cms\App:io in [..]/kirby/src/Cms/App.php:773
#0 Kirby\Cms\App:render in [..]/index.php:5