CMS Development

henryd1
Member

Blog post summaries not showing

SOLVE

While working on a blog listing page (Click here), I'm facing the problem that the blog post summaries don't want to show up. I've somehow pulled it of for the first post (bottom one) but that's it. Any new post will show up without a summary (see second blog post).

 

And, if I clone the first post, the blog post summary will be shown, however, editing the first paragraph of the clone doesn't change the blog post summary in the listing page (see third blog post/top one).

 

Somehow it's shown correctly in HubSpot Design Previewer. 

Screenshot 2019-08-08 at 16.22.25.png

 

I'd be thankful for any guidance on this. 🙂

 

Here's a code snippet of the blog listing module:

Screenshot 2019-08-08 at 15.36.33.png

0 Upvotes
1 Accepted solution
henryd1
Solution
Member

Blog post summaries not showing

SOLVE

Hi Designer_WOT,

 

I think I have managed to find & solve the problem. It appears that my blog post template didn't have the necessary HubL variables {content.post_body}. I realised the problem after switching the blog post template. 

 

My actual blog post template had only rich text modules which weren't recognized as such, I guess.

 

Afterwards, I had some troubles with implementing an editable {content.post_body} - or turning a rich text module into content.post_body - into my new blog post template that but I managed to edit the blog content module/post template. 

 

You can have a look at the result here

 

Many thanks again for your, it was much appreciated!

 

Cheers,

 

 

View solution in original post

0 Upvotes
3 Replies 3
Designer_WOT
Contributor

Blog post summaries not showing

SOLVE

There are 2 situations in which blog listing content could not renders in listing

1. If we have disabled the option "Show summeries in listing" from backend blog settings
show-summeries.JPG

 

2. There is no content above <!-- More -->  separator in blog post content.
No worries if you haven't idea about it just replace 

{{ content.post_list_content|safe }}

with

{{ content.post_list_content|truncatehtml(200, '..' , false) }}

in blog listing markup. 
Here 200 is no. of characters you want to show in listing..
you may change it as per your requirement.



Mark it as solution if it helps !


 

henryd1
Solution
Member

Blog post summaries not showing

SOLVE

Hi Designer_WOT,

 

I think I have managed to find & solve the problem. It appears that my blog post template didn't have the necessary HubL variables {content.post_body}. I realised the problem after switching the blog post template. 

 

My actual blog post template had only rich text modules which weren't recognized as such, I guess.

 

Afterwards, I had some troubles with implementing an editable {content.post_body} - or turning a rich text module into content.post_body - into my new blog post template that but I managed to edit the blog content module/post template. 

 

You can have a look at the result here

 

Many thanks again for your, it was much appreciated!

 

Cheers,

 

 

0 Upvotes
henryd1
Member

Blog post summaries not showing

SOLVE

Hi Designer_WOT,

 

thank you so much for your help, really appreciate it!

 

Blog setting have been set accordingly, and I changed the variable as per your suggestion, however, it doesn't seems to solve the problem as it effects only the first post (and its clone). 

 

It's really strange because it's perfectly fine for the first blog post and I've experimented with it around but with no success. 

 

Best wishes, 

0 Upvotes