Dynamic page / HubL / PHP = confusion

patrickhummel
Contributor

Hello all!

 

I am new with HubL and also with HubDB but it is going. I started with a table and dynamically generated content: after a few hours I got it.

 

I also read the blog posts about Dynamic page and the examples of team members or appartment listings,but I have still some questions, perhapse I did not understand all in the tutorials.

 

1. How to refer to data (like just display the info if...... is checked)

My code is here:

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

{% if table == [] %}
    <p class='align-center'>Fehler</p>
{% else %}
  {% for row in table %}
<div class="event-container {{ widget.cards_in_row }}">
    <div class="event-card">
        <div class="event-name">
            <p><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.title }}</a></p>
        </div>
        <div class="event-details">
            <p class="event-info-date"><i class="socicon icon-Calendar-4"></i>{{ row.training_date }}</p>
       </div>
        <div class="event-details">
            <p class="event-info-location"><i class="socicon icon-Map-Marker2"></i>{{ row.venue }}</p>
       </div>
       <div class="event-button">
           <a href="{{ request.path }}/{{ row.hs_path }}">Details & Anmeldung</a>
       </div>
    </div>
</div>
{% endfor %}
{% endif %}

But I would like to display only that rows, that has a check up for a specific column (yes).

 

2. I nearly got it how to get a dynamic link with the information of the database. With hb_path or something similiar I defined a page title and link. But now my question: Where or how can I create a new page or how can I refer a template to this data?

 

Thank you for your time and help!

Patrick

0 Upvotes
1 Reply 1
roisinkirby
HubSpot Product Team

Hey @patrickhummel are you still having trouble? If so please let me know and I'll get you connected with a design expert. 

0 Upvotes