0

Particles are very flexible and user-friendly, but they can only get Joomla's article as content provider, as http://docs.gantry.org/gantry5/advanced/content-in-particles points out:

{% set options = {published: true, id: [14, 3]} %}
{% set finder = joomla.finder('category', options) %}

But very often people are using other components as main content organizer, such as K2 or Easyblog, especially when Easyblog allow users to directly create/edit articles from MS Word. It is not hard for me to retrieve Easyblog's posts in PHP:

<?php
// Include the engine
include_once(JPATH_ADMINISTRATOR . '/components/com_easyblog/includes/easyblog.php');

// Only fetch 10 posts
$limit = 10;

// Category id's (one or more)
$options = array(1);

$model = EB::model('Category');
$posts = $model->getPosts($options, $limit);

But gantry particles are using twig, which I am not very familiar with. So the question is, how do I integrate what I retireve from Easyblog via PHP into Gantry's twig environment?

1 Answer 1

0

The documentation for pulling content in particles is at: http://docs.gantry.org/gantry5/advanced/content-in-particles

The short answer is that it is not easy and you might want to hire a developer to code that. I would suggest asking if anyone would be willing to do it as a freelance project through the Gantry5 Gitter board. https://gitter.im/gantry/gantry5

I saw you already commented on the GitHub issue about this: https://github.com/gantry/gantry5/issues/1480

1
  • I'd like to learn how to develop this feature, just don't know where to start.
    – shenkwen
    Commented Nov 20, 2019 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.