Hi everyone, I’ve been a big user of the patterns plugin for one of my previous kirby2 sites and I just realized I might be in trouble for migrating to kirby3 without it.
Even if the list of components via the /patterns url was fun and useful I can go without it to be honest. What I need to most is the pattern() function, as I was using a controller to fetch data and transfer it to my components.
I was wondering if a similar feature exists in Kirby 3 or if it’s possible to reproduce it in someway?
I just tried renaming it but it doesn’t seem to work. When I don’t have the plugin I have the classic debugger saying to me that pattern() does not work. When I add the plugin and rename the patterns.php to index.php, my home shows me a blank page with a simple “Error” message in a h1, the rest of the dom is empty. Having the plugin activated also breaks language detection and all other pages.
Apologies, I got my wires crossed. Renaming patterns.php to index.php has got the patterns() function working for me, but not the styleguide interface. I’m not sure if its affected the language detection for me, but I can view other pages.
I’m getting the blank page with the h1, but I’m assuming that’s because I’m using the PlainKit? (thats the default template format).
I don’t see how just renaming the main plugin file can possibly work, considering that the plugin uses for example, toolkit classes that no longer exists as well as some other stuff.
I don’t see how just renaming the main plugin file can possibly work, considering that the plugin uses for example, toolkit classes that no longer exists as well as some other stuff.
Oh, ok. The patterns I’ve been testing it with are pretty basic (at the ‘atom’ level, outputting links / svg icons etc), but they are rendering. From what you’re saying, I’m guessing if I kept using it for more complicated components I’m going to run into problems. Thanks for the response.
On my side I just moved the patterns folder inside the snippet folder, converted the pattern() to snipper() and adjusted urls. It didn’t took a lot of time.
Hi there, I started to make the patterns plugin compatible with Kirby 3. It’s already working, but maybe I missed some details, haven’t tested all functionality yet. Have fun