I created a custom HubL template and attempted to make a text field editable, but it’s not working. The code works fine in the editor, but after publishing, no changes reflect on the live site. Below is the code
I created a custom HubL template and attempted to make a text field editable, but it’s not working. The code works fine in the editor, but after publishing, no changes reflect on the live site. Below is the code
Hey @jerinvjose,
Thanks for sharing the recording. After reviewing it, I suspect this might be a cache-related issue.
Could you please try viewing the updated web page in an incognito window?
Hope that helps!
Regards,
This is the page. It’s been several hours. The change is still not applied. I checked on incognito as well
https://gettaxshield.com/blank-page33
Hi @jerinvjose
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@BrandonWoodruff @nickdeckerdevs1 @Anton - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,
Victor
@jerinvjose
At first I thought that this might be a caching issue, and to be sure of that, always use the “preview” button at the top right and click the preview link that appears to open it in a new window --
however that doesn’t seem to be the issue here.
can you paste in your module code OR record another video where you show it?
please tag me so I see it right away!
Hi @nickdeckerdevs1, Thanks for replying. Please find the code below.
<!--
templateType: "page"
label: "Blank Template"
screenshotPath: "../images/template-previews/blank_templete_preview.png"
isAvailableForNewContent: true
-->
{% set page = "Modular Tax Office Template" %}
{% set pageTitle = "Blank Template 04" %}
{% set content = 'Grow your Tax Office with our Cloud Based Tax Software. Hands on training, and instructions for everyone from Single Office, Multi Office or Enterprise.' %}
{% extends "./layouts/base.html" %}
{% block body %}
{% global_partial path="./partials/mobileMenu.html" %}
{% include "./partials/menu.html" %}
<section class="contact-page-banner flex flex-col justify-center items-center p-10 max-[900px]:mt-14">
<h1 class="flex items-center justify-center font-extrabold text-[36px] font-[Montserrat] max-[600px]:text-[27px] max-[350px]:text-[24px]">
{% module "hero_text_custommmm"
path="@hubspot/text",
label="Hero Text"
%}
</h1>
<p class="text-center text-[18px] font-['Nunito_Sans'] leading-7 font-normal w-[58rem] max-[900px]:w-auto">
Build1 loyalty by rewarding your clients for their continued trust and business with tailored advances that grow with their commitment.
</p>
</section>
{% endblock body %}
I’m gonna be honest with you here. I spent a few minutes here and there checking on this today to try to understand the issue -- and it doesn’t make any sense to me.
I spent most of the time during the day looking at some of the issues
You have this text module inside of a H1 tag, so you can see how your H1 is actually built:
<h1 class="flex items-center justify-center font-extrabold text-[36px] font-[Montserrat] max-[600px]:text-[27px] max-[350px]:text-[24px]">
<div id="hs_cos_wrapper_hero_text_custommmm" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_module widget-type-text" style="" data-hs-cos-general-type="widget" data-hs-cos-type="module"><span id="hs_cos_wrapper_hero_text_custommmm_" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_text" style="" data-hs-cos-general-type="widget" data-hs-cos-type="text">Some additional information in one line</span></div>
</h1>
In my opinion, if you are wanting to make this work correctly, you would build out a “Headline” module and place a TEXT field inside of it, and maybe do some things to add the classes to your H1 -- This isn’t the issue that you are having, that is more talking about doing things the right way.
Your actual issue
I’ve never used one of these default HubSpot modules when building a template -- and generally I use drag and drop fields, build all of it out in the page editor, then I copy section HUBL and paste that into the template. Since you are doing it the other way I took a look at the module documentation, it states:
I’d try adding the value param like I have in the code block below, removing your LABEL param (just following documentation to see if that allows it to work)
{% module "text" path="@hubspot/text" value="TRY ADDING THIS VALUE PARAM HERE" %}
If that doesn’t solve the issue -- I would do the following (these would be my troubleshooting steps)
I would create a new page with the same template, and try that out.
I would add other modules onto a page and see if they update text properly.
I would change my template so it allowed for a drag and drop area, somethign like this
{% dnd_area "test_area"%}
{% dnd_section %}
{% dnd_column %}
{% dnd_row %}
{% module "text" path="@hubspot/text" value="TRY ADDING THIS VALUE PARAM HERE" %}
{% end_dnd_module %}
{% end_dnd_row %}
{%end_dnd_column%}
{% end_dnd_section %}
{% end_dnd_area %}