Check Blog Listing Page Index

Regular Contributor

How do I check which blog listing page I am on...

For instance:

 

 

if blog listing page > 1 then do something

else do something different

 

Any help is greatly appreciated.


 

Reply
0 Upvotes
5 Replies
Highlighted
Regular Advisor | Gold Partner | HubSpot Certified Trainer

@jmarcello - I think it's something like:

if current_page_num > 1

If this answer helped, please, mark as solved Smiley Very Happy


tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.

 

Drop by and say Hi to me on slack.

Reply
0 Upvotes
Regular Contributor

Tim:

 

Thank you very much, it's a great start...

To extend that further, how might I write this...

{% if current_page_num > 1 AND < 5 %}
do something
{% endif %}


I am trying to learn how to use AND and OR commands to check multiple values.

Reply
0 Upvotes
Regular Advisor | Gold Partner | HubSpot Certified Trainer
{% if current_page_num > 1 and current_page_num < 5 %}
do something
{% endif %}

try that

Reply
0 Upvotes
Regular Contributor

How about this one...with an OR statement:

{% if current_page_num > 1 or current_page_num > 2 %}
do something
{% endif %}
Reply
0 Upvotes
Advisor | Platinum Partner

hi @jmarcello, looks like you have the hang of it. 

this link may be a good resource

dennis
Reply
0 Upvotes