Page 1 of 1

PHP - detect if current page is static

Posted: Mon Jan 07, 2019 4:41 pm
by rahuldottech
I'm writing some custom code for my blog's sidebar, and I need to check if the current page being viewed is static. I'm sure this a super simple if condition, but I can't figure it out. Any help?

Re: PHP - detect if current page is static

Posted: Mon Jan 07, 2019 5:28 pm
by bayerberg
yep, its very simple ;)

Code: Select all

if ($page->isStatic()) { }

Re: PHP - detect if current page is static

Posted: Tue Jan 08, 2019 5:44 am
by rahuldottech
Haha, thanks!