Hi @KJourdia,
If content.name is used without further information (like inside a loop) it will display only the internal name of the page, mail you’re looking at. Not of other elements(pages, mails, posts…)
Internal name means: How you name it in your Hub.
For instance:
If you call your email: Newsletter | Preperation for INBOUND23
this will be printed as the name on this particular page
If you want to display a name or something similar outside somewhere else you’ll need a bit more code.
If you’re goal is to display something like a “post-preview” with title, maybe a bit of a intro text and a “read more” button of one or more posts(you could also filter them by tags btw) I’d recommend to create a custom module to make your and the life of the content creators/marketers easier.
You can use almost all blog variables/loops to create the kind of info you’re looking for.
Here’s a quick run-down of the popular post loop:
The default code from documentation
{% set pop_posts = blog_popular_posts("default", 5, ["marketing-tips", "sales-tips"], "popular_past_month", "AND") %}
{% for pop_post in pop_posts %}
<div class="post-title">{{ pop_post.name }}</div>
{% endfor %}
If you’re building a custom module you can easily replace this code to something like
{% set pop_posts = blog_popular_posts(module.blog_selector, module.blog_amount, module.tag_selector, "popular_past_month", "AND") %}
{% for pop_post in pop_posts %}
<div class="post-title">{{ pop_post.name }}</div>
<div class="post-preview">{{ pop_post.post_body|striptags|truncate(200, "...", false) }}</div>
<div class="read-more-wrapper">
<a href="{{ pop_post.absolute_url }}">{{ module.read_more_text }}</a>
</div>
{% endfor %}
with some available elements like
Also you can create custom “smart-rules”(more advanced feature and wouldn’t suggest to hard code those) directly in the code.
best,
Anton