I want to add a blog post internal title for better organization on the listing blog post on the hubspot account.
I only have one < h2 > tag that have the {{ content.name }} and i want to create a < p > tag to that i will hide and this < p > will have the {{ content.name }} that will show on the blog posts list and the < h2 > will have other hubl that is the real post title to all the users.
How i create that hubl tag that i can insert in the blog post editor?
That code example will hide the internal blog post title, and allow you to set a separate, visible blog title from the blog post editor. Since the workaround is just creating a separate input field and hiding the blog post title on the page, it’s not going to replace/add a new title field in the blog post settings UI. You’ll see it in the modules tab of the blog post editor.
Regarding the external site; I’m not entirely clear on what you mean. There are a number of variables that affect what appears when your content is linked to from an external site. If it’s a social media site, there are differences in the way they crawl your page and generate links/thumbnails. If it’s a separate site/blog, it’s possible that the content was linked manually when your blog posts had the other title. Can you give me some more details on this external site?
On the blog i only have place to input one title, what do i have to do to have two inputs but one is hidden?
i do that in this way
< p style=“display:none” >{{ content.name }}</ p>
< h2>{% text “simple_section_title” label=‘Enter text for this section title’, value=‘This is a section title’ %}< /h2>
But the problem is the external website that is linking to the blog having the internal title instead of the external.
You can create a custom HubL field that includes a ‘display title’ that is separate from the ‘internal title’, and change your template markup to pull the value for the display title instead of the internal title. Something like this:
{% text "blog_display_title" label='Set a unique post display title', export_to_template_context = True %}
{% if not content.widgets.blog_display_title.body.value %}
<h1><a href="{{ content.absolute_url }}" id="hubspot-name" class="link hubspot-editable" data-hubspot-form-id="name" data-hubspot-name="Blog Title">{{ content.name }}</a></h1>
{% else %}
<h1><a href="{{ content.absolute_url }}">{{ content.widgets.blog_display_title.body.value }}</a></h1>
{% endif %}
Check out the designer docs for more information on the blog markup:
Welcome to HubSpot's Designer Documentation site. The HubSpot Content Optimization System (COS) is a powerful and flexible platform to design beautiful websites, blogs, and emails.