I am trying to use grav's isFirst() function to detect when the user is on the first page of a page collection and to display or hide a class name but this doesn't seem to be working:
<div class="moduleindexcompact{% if not page.isFirst %} hidden{% endif %}">
The "hidden" class is being applied when the user is not on the first page, but when the user is on the first page, the class is still being rendered. This suggests to me that I'm not using the isFirst() function correctly. Can someone help?