Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Yesterday at 04:02 PM
L.K. Posted November 28, 2015 Posted November 28, 2015 Hi, There are no rel="next" / rel="prev" tags in paginated topics. In paginated forums these tags are existing. I don't understand why it is like that, but what and where can I add these tags to topics? I found in Table.php following lines of code: /* Add link tags */ if ( $this->page != 1 ) { \IPS\Output::i()->linkTags['first'] = (string) $this->baseUrl->setQueryString( $this->paginationKey, 1 ); \IPS\Output::i()->linkTags['prev'] = (string) $this->baseUrl->setQueryString( $this->paginationKey, $this->page - 1 ); } if ( $this->pages > $this->page ) { \IPS\Output::i()->linkTags['next'] = (string) $this->baseUrl->setQueryString( $this->paginationKey, $this->page + 1 ); } if ( $this->pages != $this->page ) { \IPS\Output::i()->linkTags['last'] = (string) $this->baseUrl->setQueryString( $this->paginationKey, $this->pages ); } Should I add these lines to Controller.php file after these line? /* Set meta tags */ \IPS\Output::i()->linkTags['canonical'] = (string) ( \IPS\Request::i()->page > 1 ) ? $item->url()->setQueryString( 'page', \IPS\Request::i()->page ) : $item->url() ; \IPS\Output::i()->metaTags['description'] = $item->metaDescription(); \IPS\Output::i()->metaTags['og:title'] = $item->mapped('title'); \IPS\Output::i()->metaTags['og:type'] = 'object'; \IPS\Output::i()->metaTags['og:url'] = (string) $item->url(); \IPS\Output::i()->metaTags['og:description'] = $item->metaDescription(); if( $item->mapped('updated') OR $item->mapped('last_comment') OR $item->mapped('last_review') ) { \IPS\Output::i()->metaTags['og:updated_time'] = \IPS\DateTime::ts( $item->mapped('updated') ? $item->mapped('updated') : ( $item->mapped('last_comment') ? $item->mapped('last_comment') : $item->mapped('last_review') ) )->rfc3339(); } Thanks.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.