ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down.
Read our Farewell Blog Post for more details.
SOLVED Installing Particles in core Gantry 5 framework?
Posted 9 years 6 days ago
Hi
I have created a particle which we use on ever site we develop. Currently we have had to upload the files everytime we start a new project (the yaml, html.twig and scss file) and then make reference to the scss file in the custom scss file.
I have been trying figure out a way we could potentialy have the particle installed in the core Gantry 5 framework and make reference to the scss file withouth any files being overriden on updates. The only way I can think to do it at the moment is to move the styling inline into the html.twig file.
As it being only 1 particle it is not a big hassle but we are developing more which we would like to be able to place in Gantry and be able to simply drag and drop without having to have any manual interaction apart from uploading the files for the first time. It's just to save time in our process so we aren't uploading files every project. Some people would call it lazy, I like to think of it as being efficient
Re: SOLVED Installing Particles in core Gantry 5 framework?
Posted 9 years 6 days ago
The safest way is to install your new particle as custom. Putting it anywhere else will require you to change template files which would be overwritten by template updates. So the correct way would be
1. YAML and TWIG file in /templates/templatename/custom/particles.
2. SCSS file in /templates/templatename/custom/scss/
3. Import the above SCSS into your custom.scss in /templates/templatname/scss
Perhaps you could write a little script or even an unzip to do that quickly for yourself in your many projects.
Regards, Mark.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
Re: SOLVED Installing Particles in core Gantry 5 framework?
Posted 9 years 2 days ago
Thanks MrT. I knew it probably wasn't the best idea, but just wanted to too see what was possible. I might look into creating a script or something to do it instead.
This is our Web Tech Plus Team account. Advice, design and other things are what we do, thanks for your help and understanding.