CMS Development

Anton
Especialista reconhecido(a) | Parceiro Diamante
Especialista reconhecido(a) | Parceiro Diamante

Custom (external) RSS Feed Module

resolver

Hi, 

a customer wants to have a custom rss module, which pulls the data from a external RSS Feed(XML) with following options

- show postings with tag "X"

- display "X" amount of postings

and some other options

 

The most simple way would be to clone the HubSpot RSS Feed module and to customize it, right?

I'm struggling with the layout change of the RSS Feed. When I clone the Module and edit it, the only thing I'm seeing is the Hubl code of the module.

{% if module.rss_feed_type == "external" %}
    {% set feed_source = "{is_external=True, rss_url='"~module.rss_url~"', content_group_id=''}" %}
    {% set is_external = true %}
{% elif module.rss_feed_type == "blog" %}
    {% set feed_source = "{is_external=False, content_group_id='" ~ module.content_group_id ~ "', rss_url=''}" %}
    {% set is_external = false %}
{% endif %}

{% rss_listing
    publish_date_text="{{ module.publish_date_text }}",
    rss_url="{{ module.rss_url }}",
    is_external="{{ is_external }}",
    click_through_text="{{ module.click_through_text }}",
    show_date="{{ module.show_date }}",
    content_group_id="{{ module.content_group_id }}",
    include_featured_image="{{ module.include_featured_image }}",
    publish_date_format="{{ module.publish_date_format }}",
    show_detail="{{ module.show_detail }}",
    show_author="{{ module.show_author }}",
    number_of_items="{{ module.number_of_items }}",
    limit_to_chars="{{ module.limit_to_chars }}",
    attribution_text="{{ module.attribution_text }}",
    topic_id="{{ module.topic_id }}"
%}

where is the HTML layout?

 

Is there a way to give the feed a complete custom (HTML) layout?

 

Like three columns. Left *name*, middle *info*, right *read more button*

 

 

regards,

Anton

Anton Bujanowski Signature
0 Avaliação positiva
1 Solução aceita
tjoyce
Solução
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Custom (external) RSS Feed Module

resolver

@Anton - This is a hubl tag that pulls the feed from ajax (not server side). So, you will need to use javascript to design the feed and pull the necessary data. Look above the documentation.

"This module is loaded asynchronously on the client-side. As a result, if you want to manipulate the feed after its loaded, you'll need to define a global JS function to handle that manipulation. Use the function hsRssFeedComplete(feeds), where feeds is the jQuery selector on all feeds that have been completed. You will want to directly manipulate the DOM object in that function."

 

I personally, find it easier to just find a decent jquery plugin that is built for RSS feeds since there's more built in functionality around the feed.


If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

 

Exibir solução no post original

0 Avaliação positiva
3 Respostas 3
AAlsalkhadi
Colaborador(a) | Parceiro Platinum
Colaborador(a) | Parceiro Platinum

Custom (external) RSS Feed Module

resolver

@suryast, @tjoyce@Anton,  I wonder about that, too. Do you have a solution for this case?

We have a customer, who want the same a the customer of @Anton, but it should me for ab E-Mail-Template, so we are not allowed to use Javascript :-(

I was thinking about storing the RSS feed in HubDB and then using HubL to retrieve the data. What do you think about that?

0 Avaliação positiva
tjoyce
Solução
Especialista reconhecido(a) | Parceiro Elite
Especialista reconhecido(a) | Parceiro Elite

Custom (external) RSS Feed Module

resolver

@Anton - This is a hubl tag that pulls the feed from ajax (not server side). So, you will need to use javascript to design the feed and pull the necessary data. Look above the documentation.

"This module is loaded asynchronously on the client-side. As a result, if you want to manipulate the feed after its loaded, you'll need to define a global JS function to handle that manipulation. Use the function hsRssFeedComplete(feeds), where feeds is the jQuery selector on all feeds that have been completed. You will want to directly manipulate the DOM object in that function."

 

I personally, find it easier to just find a decent jquery plugin that is built for RSS feeds since there's more built in functionality around the feed.


If this answer helped, please, mark as solved 😄


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

 

0 Avaliação positiva
suryast
Participante

Custom (external) RSS Feed Module

resolver

I am not sure if this is the right thread to ask. I wonder what solution you would recommend for the styling of RSS feed in an email since emails cannot have javascript in them.