CMS Development

RicardoFlores
Member

Hubspot Dynamic Pages Problem

Hello,

 

I'm having a problem with my dynamic pages in hubspot. Some rows assume that they are the table instead of the row in the template, so instead of having the row information on the page I have the list of the table of HubDB. I already saw some post about cache so a added the variable "local_dt" hidden. Can anyone tell me what is happening?

 

Example:

In this link was supposed to be information about the career oportunity of function analyst in porto instead appears the table list.

 

TEMPLATE:

 

{% extends "../layouts/base.html" %}


{% block body %}
{{ require_css(get_asset_url('/Atomic-copy/css/header_new.css')) }}
{{ require_css(get_asset_url('/Atomic-copy/css/footer_new.css')) }}
{{ require_css(get_asset_url('/Atomic-copy/css/contact_career.css')) }}

<script type="text/javascript" src="{{ get_asset_url('/Atomic-copy/js/career_application.js') }}"></script>

<main class="body-container-wrapper">

<div class="contact_wrapper">

<div class="career_info">

<div class="icon_contact">
<p style="visibility: hidden;">
{{ local_dt }}
</p>
<img loading="lazy" src="https://f.hubspotusercontent20.net/hubfs/7431024/Icon%20Recrutamento%20v3.png" alt="Icon Recrutamento v3" style="max-width: 100%; height: auto;">
</div>
{% if dynamic_page_hubdb_row %}

<h6 class="career_title">{{ dynamic_page_hubdb_row.job_title }}</h6>
<p class="career_region">{{ dynamic_page_hubdb_row.job_region.name }}</p>
<div class="career_info_content">{{ dynamic_page_hubdb_row.job_info }}</div>

{% elif dynamic_page_hubdb_table_id %}
<ul>
{% for row in hubdb_table_rows(dynamic_page_hubdb_table_id) %}
<li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></li>
{% endfor %}
</ul>
{% endif %}

</div>

<div class="contact_form">
{% module "module_16127958987742" path="/Atomic-copy/modules/Form", label="Form" %}
</div>

</div>

</main>
{% endblock body %}

0 Upvotes
3 Replies 3
Indra
Guide | Elite Partner
Guide | Elite Partner

Hubspot Dynamic Pages Problem

Hi @RicardoFlores,

 

You can inform the client about what caching is and what it's for.

You can also give them a link to remove the cache by sending the documentation from Clear your browser's cache.

 

I just warn the client about caching and tell them to check the page in incognito of visite the page from another browser since it's in most cases easier then removing the browser cache.


Vet Digital - The Growth Agency | HubSpot Solutions Partner Agency

Did my post solve your question? Help the community by marking it as a solution
0 Upvotes
RicardoFlores
Member

Hubspot Dynamic Pages Problem

I use the extension every single time but the problem is that our clients don´t use and theu are not supposed to. 

If our client has cache it will se the worng thing. Can you explain me why that page is assuming that is the table list instead of the table row? Is anyway to work around this?

0 Upvotes
miljkovicmisa
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Hubspot Dynamic Pages Problem

Hello @RicardoFlores and thank you for writing!
Seems to me like your code is working fine, I even got to the page you posted and got the following screenshot which seems correct to me.

miljkovicmisa_0-1629994479265.png

 

However I would strongly reccommend the hubspot developer chrome extension found in this link when working with templating in hubspot, it is very handy and includes (besides other useful things) a tool for removing cache from a hubspot page by adding a ?hsCacheBuster={some_random_number} parameter in the url which eventually creates a new instance of that page you are viewing.

 

If my answer was helpful please mark it as a solution.