Copy link to clipboard
Copied
I've edited to the Blog post details layout with this tag {tag_blogpostbodypreview} which truncates to show up the 1st paragraph, I'd like to be able to specify and show the first 2 paragraphs, is this possible?
Copy link to clipboard
Copied
You can do one paragraph:
{tag_blogpostbodypreview,Text} | Display a preview of the first paragraph of your blog post. Replace "Text" with the relevant words to link to see the entire post. |
Copy link to clipboard
Copied
Hi Liam,
I have been trying to do something similar. I have tried to insert an image and then the paragraph I have been able to get 3 posts to show up. But I would like to include the image in the preview. I can get the image in but it seems the blog wysiwig interface has changed and I can't get the image to set to the left and then show the proper amount of text to show up so that the image and the text look uniform.
Any suggestions?
Also I'm not going crazy did they just change the wysiwig editor?
Copy link to clipboard
Copied
The Blog WYSIWYG will not have changed any time soon unless you turned on a new beta feature for BC.Next.
You just need to insert the image at the start of the first paragraph
Copy link to clipboard
Copied
I checked the beta activation and I have not....the editor is totally different from yesterday. I can't edit the photo by right clicking and placing image (up down right left) Where did is go?
Copy link to clipboard
Copied
I was talking to tech support and they did say that the editor has changed. Thanks for your reply earlier by the way.
Copy link to clipboard
Copied
In the BC Admin, the blog editor is exactly as it has been for some time. Support will not have said it has changed, it hasn't. If they did or you think they did there would have been some miss understanding there.
Trust me, it is no different then it has been for quite some time.
Copy link to clipboard
Copied
this is what it looks like...Does yours?
Copy link to clipboard
Copied
If you have an existing site, that new editor is part of BC.Next which is in beta and if you start new sites is only available in the beta section and something you enable. A number of elements of that editor do not function 100% at the moment, being a beta feature.
If you want it back to normal under settings - beta options there is a tick for that you should be able to disable. I would talk to your dev or whoever turned that on though in case they were using any of the new code stuff as part of the beta on the site.
Copy link to clipboard
Copied
HI Liam, Thanks for the help. I did untick the beta version activation and it is back to normal. (It auto activated because I never ticked it in the first place)
Now that I have the old wysiwig editor back I am having trouble formating the paragraph with the image in it. I am using the {tag_blogpostpreview,More Details...}
What I want is the image on the left and the copy on the right. I set the image to align to the left but the text won't seem to pull away on the right. Any thoughts?
Also how can I get the copy to only show the copy to line up with bottom of the image?
Thanks ma'Dude,
d
Copy link to clipboard
Copied
It does not auto activate, someone will have turned it on.
Copy link to clipboard
Copied
With Liquid, this is now possible (albeit still a bit clunky).
See this discussion for some history and other ideas if you're interested.
Basically, you can use this within the postlist layout:
{% assign blogPreview = body | split: '</p>' -%}
{% for item in blogPreview limit: 2 -%}
{{item | prepend: '</p>' }}
{% endfor -%}
What this does is split up the body of each blog post into an array of items using the closing paragraph tag as the identifier for the end of each item and start of a new one. The array is given a name: "blogPreview".
Then, limit the number of array items shown to 2 and prepend a closing paragraph tag to each one (the </p> is not included within each array item because it was used as the split identifier).
This will output the first 2 paragraphs of a blog post.
It should be noted however that this method will leave other elements untouched. For example, if a blog post contains headings, images, lists or anything else before the second paragraph, these will also be displayed within the preview. I have tried many ways to get around this (see the thread I previously linked to) but they all end up with issues.
Hope that helps.