La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
HubDB request limit: hubdb_table_row in a for-loop with data from related tables
Résolue
Hey,
i am struggling to understand what is the right way to solve my problem. i want to display all blog entries and add some related informations from connected tables (customer und products). This is causing too many requests and runs way to fast in the page limit of requests.
How can I change my code to not run in this limit? It would be amazing if you guys could me out.
{% for post in post_listing %}
{% set product_id = post.widgets.choice_product_id.body.value %}
{% set product = hubdb_table_row(4024611, product_id) %}
{% set customer_id = post.widgets.choice_customer_id.body.value %}
{% set customer = hubdb_table_row(2697665, customer_id) %}
<article>
<a class="testimonial-listing-card" href="{{ post.absolute_url }}">
{% if post.featured_image %} <img class="testimonial_featured-image" src="{{ post.featured_image }}" alt="{{ post.featured_image.alt }}">
</a>
<div class="testimonial-card-text-overlay">
<a href="{{ post.absolute_url }}"><img src="{{ customer.logo_de.url }}" alt="{{ customer.name }} {{ customer.name|pprint }} Logo" class="testimonial-card-logo"> <h3>{{ post.name }}</h3> </a>
</div>
</article>
{% endfor %}
HubDB request limit: hubdb_table_row in a for-loop with data from related tables
Résolue
I really would like to show all entries on one page with a continuos loader. I could remove the first call, but still struggling with the customer call. Is there a way to call all entries from 2 columns (id and url) in a dict?