Changing Module Data from BC to Treepl

How do I change these module_data items from BC into Treepl?

{module_data resource=“categories” version=“v3” fields=“id,category” skip=“0” limit=“500” order=“category” where="{‘category’:’{{this[‘Name’]}}’}" order=“id” collection=“thisCat”}

{module_defaulturl collection=“defaulturl” template=""}

Is there a list of all of these module data fields? I’m not sure how to add them to page from scratch.

In Treepl we have access to most data via component tags. So in that sense, there is usually a component tag to complement any module_data end-point.

However, where we don’t yet have the power of module_data is in its ability to look up sub-resources and do advanced filtering.

Your particular case though looks to be retrieving a Category by name which, in Treepl we can only look up a specific category by ID. So you might have to retrieve them all and then loop through the data to find the appropriate one.

I guess it depends on what information is being retrieved from that category item and how it’s being used. But these are the 2 docs relating to categories:

I’m guessing something like this might work:

{% component type: "module_category_list", module: "{{this.parentId}}", layout: "", collectionVariable: "catData" %}

Then the loop:

{% for i in catData.items %}
    {% if == %}
        <!-- do your thing here... -->
    {% endif %}
{% endfor %}

Might need some more info on how it’s being used if this doesn’t get you where you need to be.