Hubdb_table in custom module

hubdb

#1

I’m trying to do something that I think should be simple, but I can’t get the syntax right.

I’m trying to let the user select the HubDB table to be passed in to a simple module that will return content for a div. It works when I set the hubdb ID specifically, but using {{ module.hubdb_table }} (or other hubl token) gives me a an error.

There’s probably a better way to structure this anyway, but I’m still learning Hubl…

Code for reference:

{% set table = hubdb_table_rows( hubleTable , queryparam ) %}

{% set hubleTable = {{ module.hubdb_table }}
{% set queryparam = “&content_id__eq={{ module.content_id }}” %}

{% if table == [] %}

Sorry, no content found with that ID.


{% else %}
{% for row in table %}
{{ row[

{{ row["content_header"] }}

{{ row["content_description"] }}

{% endfor %} {% endif %}