CMS Development

DavidFJones
Member | Platinum Partner
Member | Platinum Partner

Multilevel Dynamic Template Not Going More Than 1 Level Deep

Hello,

I am attempting to create a multilevel dynamic template using hubdb and following this guide as reference - https://designers.hubspot.com/how-to-build-multilevel-dynamic-templates

The issue I am having is that I cannot go more than 1 level deep into my nested tables. The first and second page will populate the content as expected, but going any further results in a 404. All tables have been set to have dynamic pages enables and to allow child tables.

Here is a link to the page to view the issues on - https://resources.purebookkeeping.com/hubdb-modules . Going into a Course will take you to "Level 1", while clicking any further should take you to a 404

Here is the code I am using to populate the page with the tables

 

  {% if dynamic_page_route_level == 0 %}
	<h1>Courses</h1>
    {% set rows = hubdb_table_rows(dynamic_page_hubdb_table_id) %}
    {% for row in rows %}
     	<h2><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></h2>
     {% endfor %}
  {% elif dynamic_page_route_level == 1 %}
    <h1>{{dynamic_page_hubdb_row.hs_name}}</h1>
      {% set rows = hubdb_table_rows(dynamic_page_hubdb_row.hs_child_table_id) %}
      {% for row in rows %}
        <li><a href="{{ row.hs_path }}">{{ row.hs_name }}</a></li>                
      {% endfor %}
  {% elif dynamic_page_route_level == 2 %}
    <h1>Lessons</h1>
      <h2>{{dynamic_page_hubdb_row.hs_parent_row.hs_name}}</h2>
      <h3>{{dynamic_page_hubdb_row.hs_name}}</h3>
  {% endif %}

I have also tried changing the blue line of code to the follow, with the same results.

 

 

<li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></li> 


As for level of experience I would say experienced  junior developer. I have a fair amount of experience with programming for the web, but am still quite new to HubSpot.

 

0 Upvotes
1 Reply 1
sharonlicari
Community Manager
Community Manager

Multilevel Dynamic Template Not Going More Than 1 Level Deep

Hey @DavidFJones 

 

Thank you for the information provided.I'll tag a few experts that can share their experience with you.  

 

Hey @Kevin-C @Chris-M @alyssamwilie any thoughts you would like to share with @DavidFJones

 

Thanks

Sharon


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes