C5.7 Getting page attribute in template
I´m thinking about giving the body a class with "slideshowTrue" or "slideshowFalse" and call the slideshow with js depending on this class.
But how is it possible (5.7) to get the value of this page attribute to append its value to the body?
$page = \Page::getCurrentPage(); $value = $page->getAttribute('slideshow');
Where $value is now 0 or 1
"Retrieving the Current Page Object
From within a Page Template
Within a page template (e.g. a template file found in a theme or a single page template) you don't have to do anything to retrieve the current page object. It's already present in the local scope:
(The $c stands for "current page.")"