(small) update:
Sorry I didn’t get it right while reading.
To get it right you’ll need those things:
- HubDB table function
- a text/select function for the tags // I would suggest a select function
- a text/number function for the amount of posts you’d like to show / I suggest a number function
First of all set them up, group them and enable the repeater option at the bottom of the right sidebar(you can set a min and max value if you’d like to have those). It should look like this
Settings:
- HubDB table: you should select your default one. By doing this the module will work right away
- Category filter: If you’re using a select option you’ll need to recreate your categories from the HubDB. The label is up to you( for UX reasons I would suggest to use the same names as in the HubDB). The value must be entered exactly(upper/lowercase) as value. Otherwise it might not work.
- Post limit: If you’re going with a number function you can set up a min and max value for how many posts should be displayed
And now for the fun part - the layout/hubl:
First create a for-loop for your repeater
{% for single_row in module.category_wrapper %}
...
{% endfor %}
now add the HubDB function to it
{% set table = hubdb_table_rows(single_row.hubdb_table,"category="~single_row.category_filter~"&limit="~single_row.post_limit) %} {# replace "category" with the name of your category column #}
it has some filters build in which are accessing the other settings
after you’ve done it add another for-loop to iterate through the filtered table
{% for one_result in table %}
...
{% endfor %}
to get all your data from the HubDB for your layout you’ll need to get it “printed”. Add an output to this for-loop.
It should look like this:
{% for one_result in table %}
{{ one_result }}
{% endfor %}
You can write your desired layout like this
{{ one_result["3"] }} {# the number is in my case the column I want to print #}
All together the code should look like this:
{% for single_row in module.category_wrapper %} {# start loop for each repeated option #}
{% set table = hubdb_table_rows(single_row.hubdb_table,"category="~single_row.category_filter~"&limit="~single_row.post_limit) %} {# hudb_filter; replace "select" with the name of your category column #}
{% for one_result in table %}{# start loop for each HubDB result #}
{{ one_result["3"] }} {# the number is in my case the column I want to print;replace it with your layout and use the numbers according to the columns/what the output will tell you #}
{% endfor %}{# end loop for each HubDB result #}
{% endfor %}{# end loop for each repeated option #}
hope this helps
best,
Anton