CMS Development

Terry
メンバー

Adding Blog Articles to Thank You Page

解決

On a thank you page I've created I'd like to add recently added blog articles to that page similar to what I see here.. 

https://blog.hubspot.com/blog/tabid/6307/bid/6117/thank-you-come-again-best-practices-for-thank-you-...

 

I like the look of the Related Articles and that's what I want added but the current modules for Post Listing and Post Filter does not accomplish what I want. The articles should updatea as I add new articles. Is there a way to do this easily?

 

Thanks

Terry

0 いいね!
1件の承認済みベストアンサー
Jsum
解決策
キーアドバイザー

Adding Blog Articles to Thank You Page

解決

@Terry,

 

I find the easiest way to pull this off is to use a recent post function

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

and build the layout of my choosing inside of the for loop. All of the blog variables you use in a blog can be used here, including if you create custom fields, but instead of "content." you would use what ever the single item name for the loop is, in this case "rec_post". see: {{ rec_post.name }}.


元の投稿で解決策を見る

0 いいね!
6件の返信
ashleyidesign
トップ投稿者 | Solutions Partner
トップ投稿者 | Solutions Partner

Adding Blog Articles to Thank You Page

解決

Hey Terry,

 

This requires some tweaks to the CSS and possible javascript to get the look you're going for there. The default post listing/filters show the posts full-width of the module in a stacked list, and you need to get them in smaller columns instead.

 

If you're familiar with CSS then shouldn't be an issue, otherwise you'll need a designer's help with that.

0 いいね!
Terry
メンバー

Adding Blog Articles to Thank You Page

解決

Hi Ashleigh

Thanks for the response here. My designers are COS certified but this seems to be a bit more than they can handle. Do you know of any resources I can look into?

 

Terry

0 いいね!
ashleyidesign
トップ投稿者 | Solutions Partner
トップ投稿者 | Solutions Partner

Adding Blog Articles to Thank You Page

解決

Hey Terry,

 

Let me know if you still have issues with the solution Jsum posted. Feel free to shoot me an email ashley at ashleyidesign.com

0 いいね!
Terry
メンバー

Adding Blog Articles to Thank You Page

解決

Hi 

Been discussing this with my programmers and with a bit more customizing this snippet did seem to work. We're continuing to 'toy' with it but thanks it was definitely a step in the right direction.

 

Terry

Jsum
解決策
キーアドバイザー

Adding Blog Articles to Thank You Page

解決

@Terry,

 

I find the easiest way to pull this off is to use a recent post function

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

and build the layout of my choosing inside of the for loop. All of the blog variables you use in a blog can be used here, including if you create custom fields, but instead of "content." you would use what ever the single item name for the loop is, in this case "rec_post". see: {{ rec_post.name }}.


0 いいね!
catarinac-app
メンバー

Adding Blog Articles to Thank You Page

解決

Hello,

 

Can you write a step by step on how to  put the code on the template to make the related articles work?

 

Thank you!

0 いいね!