ipowell
December 20, 2017, 5:10pm
1
I’m trying to edit the way an RSS feed appears within one of my page templates (not the blog template).
This is what I have so far
This is the inspiration I have - an example
I’m trying to include the tag that is linked for the specific post. It’s filtered by the recent posts.
How do I make it so the tags are visible within my page?
The date, author, title, image etc are optional to include, but I can’t find any resources that show me how to include the tag with the individual posts in the feed.
I know there’s the post filter - but it is separate and isn’t linked to the feed.
Hi @ipowell ,
for you have to create custom hubl code for recent posts feed with the topic name,
if you familiar with HUBL code development,
Hubl Code for recent post
take just one Custom HubL from left sidebar in design manager and paste this code
{% if rec_post.topic_list %}
{% for topic in rec_post.topic_list %}
<a class="topic-link" href="{{ group.absolute_url }}/topic/{{ topic.slug }}">{{ topic.name }}</a>{% if not loop.last %}{% endif %}
{% endfor %}
{% endif %}
take all code from reference lint and fit my only topic code into it, so it will work for you.
Did my post is work for you? if yes then Please marking as a solution.
Team TRooInbound
ipowell
December 20, 2017, 8:24pm
3
I already have an rss module set up - I tried putting the code in, but it didn’t work.
ipowell
December 20, 2017, 9:52pm
4
I ended up doing a bit of digging using the links you provided and the code, and I ended up with this:
{% set rec_posts = blog_recent_posts('default', 😎 %}
<h3>Upcoming Events, Webinars & Trade Shows</h3>
{% for rec_post in rec_posts %}
<div class="rec-post-item">
{% if rec_post.topic_list %}
{% for topic in rec_post.topic_list %}
<a class="topic-link" href="{{ group.absolute_url }}/topic/{{ topic.slug }}">{{ topic.name }}</a>{% endif %}
<div class="rec-post-image"><a href="{{ rec_post.absolute_url }}"><span style="background:#333333 url({{ rec_post.featured_image }})no-repeat;"></a></div>
<div class="rec-post-title"><a href="{{ rec_post.absolute_url }}">{{ rec_post.name }}</a>
<div class="rec-post-summary">
<span class="rec-post-date">{{ rec_post.publish_date_local_time|datetimeformat('h:mm a') }}</span>
</div>
</div>
</div>
{% endfor %}
It actually works pretty well. Thanks!