Check Blog Listing Page Index

jmarcello
Participant

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.


 

0 Upvotes
5 Replies 5
tjoyce
Recognized Expert | Platinum Partner

@jmarcello - I think it's something like:

if current_page_num > 1

If this answer helped, please, mark as solved 😄


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

 

Drop by and say Hi to me on slack.

0 Upvotes
jmarcello
Participant

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.

0 Upvotes
tjoyce
Recognized Expert | Platinum Partner
{% if current_page_num > 1 and current_page_num < 5 %}
do something
{% endif %}

try that

0 Upvotes
jmarcello
Participant

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

{% if current_page_num > 1 or current_page_num > 2 %}
do something
{% endif %}
0 Upvotes
dennisedson
Community Manager

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

this link may be a good resource

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes