I am trying to add a search option to my project and i got it working for basic stuff that uses kt(). Now I do have pages that have footnotes and use the footnote Plugin (Footnotes | Kirby CMS). Now this Plugin does not use kt() but has various options like footnotes() or withoutFootnotes().
So when i try to search in those pages I do not get any result as a return, but I also cannot just use kirbytext() else I will not have the footnote function.
Is there any way to include those pages into the search too? I already tried adding withoutFootnotes or footnotes into the search query but without success.
Not sure I understand, what has this got to do with Kirbytext? The Kirby search searches in the content file, looks like you are doing something else, but what?
It seems like for me it only searches on pages where Text is parsed using
At least that is the behaviour i get.
In the controller I have:
So I assume it searches through titles and text, but not text that is parsed with
I created a hidden textfield with
->kt() and after that it also found it via the search, even after removing the content and just leaving the
->footnotes() markdown there.
I hope this makes it a little clearer.
As I wrote above, Kirby’s native search searches through the raw content of each field in your content files. It is therefore independent of what you do with this content in your templates. See source code of what search does here:
Since the footnote is part of the raw content of a field, i.e. stored together with this field content, Kirby should find it.
Ok. I guess something is just messed up. I will try to reset it to the basics and see if it works then.