Home › Forums › Particles Support › Nesting particles
-
pepe lopexSubscriberHey Tony, happy new year!
In my design I need to include a particle as JLGRID inside another as JLACCORDION. I want that, when an accordion section is displayed, the content of a card grid made with the corresponding particle appears.
I would also like to combine other particles with a similar result.I don’t know if it is possible to nest code of a particle inside another, using an include in the code. It seems that some of your particles use it, but I don’t know if it’s the right approach for what I want.
I know this is beyond your competence and I’m willing to investigate further, but there doesn’t seem to be any documentation about this. Would you be able to guide me or provide me with documentation if it really exists? How would you do it? What should I take into account?
Please, I just need some light on this approach so I can work on it on my own. Thank you!
TonyModeratorHi there,
You can use Gantry5 module with JL Grid particle. Next, using Module anywhere to load the Joomla module Shortcode https://regularlabs.com/extensions/modulesanywhere
Last step, you can place the shortcode in to content field and check the process shortcode feature via JL Accordion settings.
Thank you
pepe lopexSubscriberThanks for the answer Tony. I hadn’t thought about this approach, it seems simpler.
Although I work with WordPress now, do you know a similar method to use particles like WP shortcode?
Anyway, to rule out this way, I ask: wouldn’t it be possible to create my own particle by taking advantage of other particles’ code through something like an include?
TonyModerator“Anyway, to rule out this way, I ask: wouldn’t it be possible to create my own particle by taking advantage of other particles’ code through something like an include?”
Its possible with WordPress plugin like https://wordpress.org/plugins/amr-shortcode-any-widget/
Install and active the plugin, you will see new “Widgets for Shortcodes” widget appear, here you can drag and drop the Gantry5 particle -> Grid card -> Adding new content and copy the shortcode generated by the plugin.
Next step: Add the shortcode inside Accordion content field for each item. Just tested and its working.
pepe lopexSubscriber
TonyModerator
You must be logged in to reply to this topic.