CMS Development

LaurenLokker
Contributor | Diamond Partner
Contributor | Diamond Partner

Is it possible for me to customise my RSS feed structure?

SOLVE

Hi there,

 

I'm trying to create a landing page for our latest blog post, and would like to change the layout/structure of my RSS feed. It currently displays with the featured image to the right of the text:

 

2017-11-21_1048.png

2017-11-21_1047.png

I'd like to move the image to sit above the text so that it displays much larger, taking up the full width of the module, preferably also pulling through the post author's image as it does on our blog posts:

 

2017-11-21_1054.png

Is it possible to make these changes to our RSS feed, and if so, where do I make the changes? 

 

Thanks.

0 Upvotes
1 Accepted solution
Jsum
Solution
Key Advisor

Is it possible for me to customise my RSS feed structure?

SOLVE

@LaurenLokker,

 

Your options are two use css to manipulate the markup output by the rss module or (and I recommend this) you can build your own rss feed using a HubL function that you can place in a custom HubL module. This will alow you to build out your own html markup so you have full control.

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

You would use all of the same variables in this for loop that you would use in a blog listing for loop but instead of {{ content.name }}, for instance, you would use the item name in your custom loop, in the case above it would be {{ rec_post.name }}. 

View solution in original post

4 Replies 4
Jsum
Solution
Key Advisor

Is it possible for me to customise my RSS feed structure?

SOLVE

@LaurenLokker,

 

Your options are two use css to manipulate the markup output by the rss module or (and I recommend this) you can build your own rss feed using a HubL function that you can place in a custom HubL module. This will alow you to build out your own html markup so you have full control.

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

You would use all of the same variables in this for loop that you would use in a blog listing for loop but instead of {{ content.name }}, for instance, you would use the item name in your custom loop, in the case above it would be {{ rec_post.name }}. 

LaurenLokker
Contributor | Diamond Partner
Contributor | Diamond Partner

Is it possible for me to customise my RSS feed structure?

SOLVE

Thanks so much! I'll go with the custom HubL module. Do you know if I can use the custom module for this landing page and the regular RSS feed everywhere else? Or can I only have one active version of an RSS feed? (In other words, will this affect my other content where I've used RSS feeds?)

0 Upvotes
Jsum
Key Advisor

Is it possible for me to customise my RSS feed structure?

SOLVE

You shouldn't have a problem. All this and the actual drag and drop RSS feed are doing is calling the contents of a specific blog and marking up the results. There are no global settings for the rss itself.

LaurenLokker
Contributor | Diamond Partner
Contributor | Diamond Partner

Is it possible for me to customise my RSS feed structure?

SOLVE

Perfect, thanks again.

0 Upvotes