Open fcFn opened 1 year ago
Just my 2-cents here @fcFn. The documentation doesn't discuss the ability to place a particle into it's own subfolder under the TEMPLATE_DIR/custom/particles
folder so the expected behavior is that this would fail, not that it would work.
So you're proposed "fix" isn't actually a fix, but rather it is considered to be an enhancement. If the files for the particles were all under one folder, i.e. .scss
.yaml
.twig
& .js
(if needed) then I could understand this but since those files are all under separate folders, I don't find your proposed enhancement necessary.
Can you provide a good case for the reasoning behind wanting to do this? I'm honestly curious because under the /particles
folder there are only 2 files per particle, the .twig
and the .yaml
files.
@N8Solutions You're right. Perhaps it should just fail with a better message instead of what it does now, such as "Please make sure your particle files are inside the root of the particles directory" (this is on Grav by the way, I'll edit the post). Or maybe it should be mentioned that particles
has to be a flat directory in the docs.
Description
If you try to put particles into their own subfolder e.g.
particles/my-particle
on Grav, Gantry will crash atpreg_match()
withUnknown modifier: m
on layout save.Steps to reproduce:
/particles/my-particle
, and put your particle files there.Expected behavior:
It should either save the layout without throwing an exception or display a better error message that would indicate what should be fixed such as "Please make sure your particle files are inside the root of the particle directory".
Possible fixes: