I have been asked by a client to take a breadcrumbmodule and convert it into a gantry 5 standard particle.
So, I've gone and learnt as much as I can find about creating particles.
I've managed to creaet a standard particle, but with no content yet.
Next, I open the source of the existing breadcrumb module that the client gave me and see that yes, it's a standard joomla module with main file, helper file and layout file.
My problem is that nowhere at all can I find any info on how to convert something like this into a particle.
All I see are particles that display conditional to the admin options in the yaml file.
Does anyone know if what I am trying to achieve is even possible?
Why do you want to go to all that trouble? Use a standard Joomla breadcrumb module published to a "module position" particle on the page. Joomla is constantly being updated - so let them have the headache of maintaining the breadcrumbs module.
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.
I would, but its a special request by the client. they want it done this way.
Don't know why. I just try to do what they ask. but in this case, I can't figure out if it's even possible to create a particle from a module.
You will have to write the particle from scratch and use calls to Joomla using their APIs to get the apprpropriate information. It could be a complicated and therefore lengthy task to undertake this and I can't think of a good reason to do it (apart from the client wants it and is prepared to pay for it, and is prepared to pay for it to be maintained for every subsequent Joomla release).
I suggest that you look at our particles that interface with Joomla to get content (e.g. contentarray) then I think you will appreciate how complex it can be. You may also to look into PHP classes and how that can be interfaced to TWIG too
http://docs.gantry.org/gantry5/advanced/php-functions
.
regmt
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.
That can be found in /media/gantry5/engines/nucleus/particles/contentarray.html.twig
That sources articles from Joomla to populate the particle so you can see how it call Joomla via it's API's.
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.
This scripting language is unlike anything I have seen before, Except for the HTML tags.
Is there a tutorial in this scripting language and the code that is in these files?
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.