CMS Development

birimski
Participant

Display a title under the featured image. (RSS Listing)

SOLVE

Hey Hubspot team,
I would like to ask you for advice how can I place the titles under the featured images of an RSS Feed of a Page Template. I can't come to solution how to make it and I would appreciate a little help from you.
I am using an RSS Listing module with ticked checkbox to display featured images.
I want to place the titles of the RSS Feed to display below the featured images there or another solution is at least to equalize the lines of the titles ( 1 row titles to start at the height of the 2 row titles, see the image attached ) and to make the featured images hyperlinks which lead to the blog article too.

Thank you in advance.
Best regards, Nicky.Capture.PNG

0 Upvotes
1 Accepted solution
Jsum
Solution
Key Advisor

Display a title under the featured image. (RSS Listing)

SOLVE

@birimski,

 

I am pretty sure that you get what you get with the drag and drop module. Other than turning things on and off, there is no easy way to customize. 

 

You could use css such as flex box, but if you aren't familiar it would be difficult to explain. You can set the wrapper to each post item to display: flex and flex-direction: column. Then you can use "order" to order each peace of the list time, so you could technically change the order this way. 

 

Honestly I think you should just use HubL function in a custom HubL wrapper. 

{% set rec_posts = blog_recent_posts('default', 5) %}
{% for rec_post in rec_posts %}
    <div class="post-title">{{ rec_post.name }}</div>
{% endfor %}

plugin some html for stucturing, I'll use hubspot's default structure classes to make structuring as easy as drag and drop:

{% set rec_posts = blog_recent_posts('default', 3) %}
<div class="row-fluid-wrapper">
    <div class="row-fluid">

        {% for rec_post in rec_posts %} 
    
            <div class="span4">
                <a href="{{rec_post.absolute_url}}">
                    <img src="{{ rec_post.post_list_summary_featured_image }}" alt="{{ rec_post.featured_image_alt_text }}">
                    <h3>{{ rec_post.name }}</h3>
                </a>
            </div>

        {% endfor %}
    
    </div>
</div>

You could actually just copy and paste this into a custom HubL module and it should work right out of the box. 

View solution in original post

3 Replies 3
adamlfoster
Member | Partner
Member | Partner

Display a title under the featured image. (RSS Listing)

SOLVE

Hi, did you figure this out? I can't even manage to get the featured images in

0 Upvotes
Jsum
Solution
Key Advisor

Display a title under the featured image. (RSS Listing)

SOLVE

@birimski,

 

I am pretty sure that you get what you get with the drag and drop module. Other than turning things on and off, there is no easy way to customize. 

 

You could use css such as flex box, but if you aren't familiar it would be difficult to explain. You can set the wrapper to each post item to display: flex and flex-direction: column. Then you can use "order" to order each peace of the list time, so you could technically change the order this way. 

 

Honestly I think you should just use HubL function in a custom HubL wrapper. 

{% set rec_posts = blog_recent_posts('default', 5) %}
{% for rec_post in rec_posts %}
    <div class="post-title">{{ rec_post.name }}</div>
{% endfor %}

plugin some html for stucturing, I'll use hubspot's default structure classes to make structuring as easy as drag and drop:

{% set rec_posts = blog_recent_posts('default', 3) %}
<div class="row-fluid-wrapper">
    <div class="row-fluid">

        {% for rec_post in rec_posts %} 
    
            <div class="span4">
                <a href="{{rec_post.absolute_url}}">
                    <img src="{{ rec_post.post_list_summary_featured_image }}" alt="{{ rec_post.featured_image_alt_text }}">
                    <h3>{{ rec_post.name }}</h3>
                </a>
            </div>

        {% endfor %}
    
    </div>
</div>

You could actually just copy and paste this into a custom HubL module and it should work right out of the box. 

birimski
Participant

Display a title under the featured image. (RSS Listing)

SOLVE

Hey @Jsum ,
It worked as a charm, now the featured images are hyperlink active and also the blog posts titles are under them.
I am so grateful of your help. Thank you very much!
Best regards, Nick.
Have a good and successful day!