Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Сделал /protected/helpers/HPage.php
- <?php
- class HPage {
- static public function pageString($param = 'page')
- {
- $page = (isset($_GET['User_page'])) ? $_GET['User_page'] : 1;
- return $page > 1 ? ' - Страница ' . $page : '';
- }
- }
- Вывожу на странице:
- if ($type != 'all') {
- $multiples = [
- User::TYPE_PRIVATE_PERSON => tc('Private persons'),
- User::TYPE_AGENCY => tc('Agencies the real estate market'),
- User::TYPE_AGENT => tc('Specialists the real estate market'),
- ];
- $titleFormat = tc('%s');
- $this->pageTitle = sprintf(
- $titleFormat,
- mb_strtolower($multiples[$type])
- ) . ': ' . tt('official website, ads', 'users') . НPage::pageString('page');
- if (array_key_exists($type, $descriptions)) {
- $this->pageDescription = $descriptions[$type];
- }
- } else {
- $this->pageTitle = tc('Subjects of the real estate market');
- $this->pageDescription = tt('All users list description', 'users');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement