I checked the gitignore and compared what files were transferred to the server. apparently all checks out, works local but doesn't work on the server.
I'm currently changing my tech stack to include composer in my vagrant box and I'll run the same test with the same _patterns but an up to date version installed via composer to compare the results.
Is there a way to build a patternlab overview page that lists the same content as the patternlab top bar but in expanded tabs/boxes so a concepter/designer can get a better feeling for the whole picture instead of having to navigate through the multiple multi level dropdowns or using the search?
If it doesn't exist, could someone point me in the right direction how to maybe build that myself as a plugin?
I'm using the PHP/Twig version.
- include():
pattern: components-image-teaser
with:
image: https://picsum.photos/800/450?image=304
title: "Title #1"
- include():
pattern: components-image-teaser
with:
image: https://picsum.photos/800/450?image=305
title: "Title #2
php core/console --server
and then pull up http://localhost:8080/ in my browser, right? However, localhost is coming up as connection refused. Is there any configuration that needs to be done with Pattern Lab or PHP to get this functioning?
Hi, were on pattern lab version 2.7.0 with twig/drupal starterkit and was installed with composer. Trying to update to latest so doing a fresh install with npm. For the most part I got everything working but having trouble migrating our /source/_twig-components which includes twig filters, functions and tags. I did find the new file alter-twig.php and seems like moving my functions there works like:
$env->addFunction(new Twig_SimpleFunction('drupal_menu', function ($string) {
return $string;
}));
but cant seem to figure out how to migrate our twig filters and tags.
For example, I tried moving a filter over to alter-twig.php like this:
$env->addFunction(new \Twig_SimpleFilter('t', function ($string) {
return $string;
}));
but results in PHP Fatal error: Uncaught LogicException: A function must be an instance of \Twig_FunctionInterface or \Twig_SimpleFunction
Any idea how to add twig filters and tags to the latest version of pattern lab. Heres my package versions:
"dependencies": {
"@pattern-lab/cli": "^5.9.3",
"@pattern-lab/core": "^5.9.3",
"@pattern-lab/engine-twig-php": "^5.9.3",
"@pattern-lab/starterkit-twig-demo": "^5.8.0",
"@pattern-lab/uikit-workshop": "^5.9.3"
}