CMS Development

rainism
Mitglied

HubDB - Filter results of a module snippet

lösung

Hello,

 

Is it possible to filter results of a custom module if I added a snippet to a HTML/Hubl template for dynamic pages so I need to print specific rows on the spefic pages?

0 Upvotes
1 Akzeptierte Lösung
Kevin-C
Lösung
Trendsetter/-in | Partner
Trendsetter/-in | Partner

HubDB - Filter results of a module snippet

lösung

Hey @rainism 

 

This sounds interesting, could you provide a little more detail? Maybe provide a scenario or business case?

 

But to guess:

With dynamic pages you can use an if statement to query the route level like this:

{% if dynamic_page_route_level == 0 %}

Then iterate through your rows:

{% set rows = hubdb_table_rows(XXXXXX) %}
      {% for row in rows %}
{{ printData }:

 To get more specific you could add another column to your Tables and query against that too.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
2 Antworten
Kevin-C
Lösung
Trendsetter/-in | Partner
Trendsetter/-in | Partner

HubDB - Filter results of a module snippet

lösung

Hey @rainism 

 

This sounds interesting, could you provide a little more detail? Maybe provide a scenario or business case?

 

But to guess:

With dynamic pages you can use an if statement to query the route level like this:

{% if dynamic_page_route_level == 0 %}

Then iterate through your rows:

{% set rows = hubdb_table_rows(XXXXXX) %}
      {% for row in rows %}
{{ printData }:

 To get more specific you could add another column to your Tables and query against that too.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Upvotes
rainism
Mitglied

HubDB - Filter results of a module snippet

lösung

Yes, I added a specific column to my tables and it helped. Thank you!