File tree Expand file tree Collapse file tree 5 files changed +33
-1
lines changed Expand file tree Collapse file tree 5 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ protected function _prepareLayout()
6969 }
7070 $ this ->pageConfig ->setRobots ('NOINDEX,FOLLOW ' );
7171
72+ $ pageMainTitle = $ this ->getLayout ()->getBlock ('page.main.title ' );
73+ if ($ pageMainTitle ) {
74+ $ pageMainTitle ->setPageTitle (
75+ $ this ->escapeHtml ($ title )
76+ );
77+ }
78+
7279 return parent ::_prepareLayout ();
7380 }
7481
Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ protected function _prepareLayout()
6464 $ robots = $ this ->config ->getAuthorRobots ();
6565 $ this ->pageConfig ->setRobots ($ robots );
6666 }
67+
68+ $ pageMainTitle = $ this ->getLayout ()->getBlock ('page.main.title ' );
69+ if ($ pageMainTitle ) {
70+ $ pageMainTitle ->setPageTitle (
71+ $ this ->escapeHtml ($ author ->getTitle ())
72+ );
73+ }
6774 }
6875
6976 return parent ::_prepareLayout ();
Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ class PostList extends \Magefan\Blog\Block\Post\PostList\AbstractList
2828 */
2929 protected function _prepareLayout ()
3030 {
31- $ page = $ this ->_request ->getParam (
31+ $ page = ( int ) $ this ->_request ->getParam (
3232 \Magefan \Blog \Block \Post \PostList \Toolbar::PAGE_PARM_NAME
3333 );
3434
3535 if ($ page > 1 ) {
3636 $ this ->pageConfig ->setRobots ('NOINDEX,FOLLOW ' );
37+
38+ $ this ->pageConfig ->getTitle ()->set (
39+ $ this ->pageConfig ->getTitle ()->get () . ' - ' . __ ('Page ' ) . ' ' . $ page
40+ );
3741 }
3842
3943 return parent ::_prepareLayout ();
Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ protected function _prepareLayout()
6868 $ this ->pageConfig ->setRobots ($ robots );
6969 }
7070
71+ $ pageMainTitle = $ this ->getLayout ()->getBlock ('page.main.title ' );
72+ if ($ pageMainTitle ) {
73+ $ pageMainTitle ->setPageTitle (
74+ $ this ->escapeHtml ($ title )
75+ );
76+ }
77+
7178 return parent ::_prepareLayout ();
7279 }
7380
Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ protected function _prepareLayout()
7070 ['attributes ' => ['rel ' => 'canonical ' ]]
7171 );
7272 }
73+
74+ $ pageMainTitle = $ this ->getLayout ()->getBlock ('page.main.title ' );
75+ if ($ pageMainTitle ) {
76+ $ pageMainTitle ->setPageTitle (
77+ $ this ->escapeHtml ($ tag ->getTitle ())
78+ );
79+ }
7380 }
7481
7582 return parent ::_prepareLayout ();
You can’t perform that action at this time.
0 commit comments