Limit Blog-Content-Loop? + Help!


#1

Hi. I’m just starting out with Pulse (5.2.2), and am struggling with a few things on the first site I’m using Pulse to power. I’ve been asked for a block that basically shows the title, image and part before the ‘Read more’ of the last 3 blog posts, on the homepage of the site, where the full blog layout would be available on a differnt page. (So basically a group of three blog teasers on a different page than the blog would live)

I’ve seen this:

{{blog:"":[[featured-image]] [[blog-content-loop(<<blog-item-author>> <<blog-item-date>> <<blog-item-featured-image>> <<blog-item-content>>)]]}}

But is it possible to pull just a limited number of these, which would be different to the usual blog page and pagination options, and can the section before the ‘Read more’ be accessed here too?

I wouldn’t have thought it was too strange a request, or too outlandish… So, how would one go about that? Is it even possible in Pulse?

Also: Is it me or do certain things just not work? The masonry gallery option ( {{masonry:galname}} ) just does a thumbnail lightbox, whereas I was expecting sometthing else, the GDPR and Cookie Consent options don’t seem to do anything either…

Please help, I’m beginning to doubt whether Pulse will be able to do much of what my clients will ask for…


#2

Thanks @ezchile and a few questions there!

Also: Is it me or do certain things just not work? The masonry gallery option ( {{masonry:galname}} ) just does a thumbnail lightbox,

Yes it’s a lightbox gallery but the layout of the images are in a “Masonry” layout.

If you wanted a different effect this is a popular Image add-on by @ArmendHajdari
https://addons.pulsecms.com/p/mgp5x


the GDPR and Cookie Consent options don’t seem to do anything either…

Those settings effect the GDPR and Cookie tags.

You can “activate” them by placing them in your Block or Page.

More on them in the manual around pages 29~

GDPR Tag

{{gdpr:additional text}}

Add a GDPR pop-up box to your page. It only has one optional parameter for extra text that is included in the popup. Once the popup is accepted, it creates a session cookie (via Javascript) that blocks the popup appearing again. If the popup is not selected, it will appear on the next page reload. There are also settings in the language files.

Cookie Consent Tag

{{cookieconsent:backgroundcolour:buttoncolour:layout:position:link}}

Setup a Cookie Consent banner on your site. Based on Cookie Consent and the options can be seen on their download page. Here’s an example to add to your Pulse site:

{{cookieconsent:#000:#f1d600:edgeless:bottom:www.pulsecms.com}}


#3

This sounds similar to a discussion here:

So to limit your front page to 3 Recent Blog Posts, use the “Recent Blog Posts” tag as detailed here from the manual around page 28:

Recent Posts Tag

{{recentposts}}

Add it to any block, blog or page to see your recent blog posts. The tag takes two parameters (both optional). The first is the number of posts to show and the second is the blog to use. eg {{recentposts:“10”:“blog/another”}} for a sub blog.

That said, it won’t show the image as yet, but we are looking to add that in an update (as mentioned in the link above).


#4

Hi, thanks for your answer. :slight_smile:

Aha! I now see the difference, I was trying each tag with the demo data and had picked gallery1, which only has 4 images, which make both types look incredibly similar. Choosing a gallery with more than 4 images makes the difference more visible.

Ok. So, I’ve figured out the GDPR pop-up, but I’m still slightly confused about the CookieConsent tag. I’m testing out the tag by placing it into a page. (home on the demo data installed by default) - If I put:

{{cookieconsent:#000:#f1d600:edgeless:bottom:www.pulsecms.com}}

as a tag into that page, nothing seems to happen. I see no consent bar and if I search for ‘www.pulsecms.com’ in the page source, it doesn’t seem to be there and neither does any javascript or css seem to be being included for the tag. :thinking:

Is that as it should be?

Thank you so much for your help!


Pulse 5.3.1 is here! 🤩
#5

Actually, I’ve just realised that I can include the CookieConsent code as a superblock, so I’ll implement it this way for now. I’m really hoping something like A new type of visual ‘recent post’ tag is forthcoming. Sounds like a great addition!


#6

Thanks @ezchile

  • Great solution adding it to a superblock. That said, it should have worked as a Tag in a page so we will test this
  • Yes the new updates to the recent post tag will most likely be in version 5.3.1 as 5.3 is ready and will be released very soon :slight_smile:

#7
  • this is fixed and will be out in 5.3.1 very soon :slight_smile:
  • Re: {{recentposts}} : this is also improved (made visualised) and out in 5.3.1

#8

Fantastic. I look forward to seeing the changes. :+1:


#9

Great!

Will post about the {{recentposts}} updates in the original thread later on:

Cheers!


closed #10

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.