Is there a way to tell what page i am on in pagination? i have a news section and i’m using the meta tags plugin by @pedroborges to set robots meta data in the page head. I want to set this differently on all pages in the pagination, except for the first page.
Basically something like this (i made this up),
c::set('meta-tags.templates', function(Page $page, Site $site) {
return [
'news' => [
'meta' => [
'robots' => $page->isPageOne()
? 'index,follow,noodp'
: 'noindex,nofollow,noodp',
],
],
];
});
How can i do this in a config file?