Checking if current page is root page

How can I check if current page is the root page?

you go to grav admin panel, open that page in it, and go to Advanced.
There you can see if parent is set to root or to something else.

Hey, you got me wrong! I mean in theme-development !

{% if page.url == base_url %}

Actually should be able to just use:

{% if page.root %}

ah okay thanks !

{% if page.url == base_url %}


{% if page.root %}

do not work for me when I load my grav system up to the server !!!

these both only work on my local server (MAMP) …

Try dumping the values and comparing them on your local and server:

{{ dump (page.url) }}
{{ dump (base_url) }}
{{ dump (page.root) }}

where can i see the dumped values ??

but thank you!

I’m new to grav debugging. so i have an open ear !!! and a curious mind !

You will need to turn on the Grav debugger and look in the messages panel. See these docs