test isStatic

Post Reply
arfa
Master Bludit
Posts: 163
Joined: Tue Jul 04, 2017 4:31 am
Location: New Zealand
Has thanked: 13 times
Been thanked: 27 times

Hi all,

I have been using: if ($page->isStatic()) and wonder if there is a similar test for sticky pages? I tried
if ($page->isSticky)) but it failed.
Searching the forum for isStatic has results but nothing for isSticky

I checked documentation but missed seeing anything.

How to test if a page is sticky?

thx - kusalo
User avatar
indocreativemedia
Ssr. Bludit
Posts: 10
Joined: Sun Sep 24, 2023 5:09 am
Location: Indonesia
Been thanked: 2 times
Contact:

Hi,

This should work:

Code: Select all

if ($page->sticky())
Please give it a try.
arfa
Master Bludit
Posts: 163
Joined: Tue Jul 04, 2017 4:31 am
Location: New Zealand
Has thanked: 13 times
Been thanked: 27 times

Yo the man! Appreciate the quick reply - and, of course... a solution.

Thank you.
Kusalo
Post Reply