Advertisement
Sdelkadrom

Untitled

Jun 16th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Сделал /protected/helpers/HPage.php
  2. <?php
  3.  
  4. class HPage {
  5.  
  6. static public function pageString($param = 'page')
  7. {
  8. $page = (isset($_GET['User_page'])) ? $_GET['User_page'] : 1;
  9. return $page > 1 ? ' - Страница ' . $page : '';
  10. }
  11.  
  12. }
  13.  
  14. Вывожу на странице:
  15. if ($type != 'all') {
  16. $multiples = [
  17. User::TYPE_PRIVATE_PERSON => tc('Private persons'),
  18. User::TYPE_AGENCY => tc('Agencies the real estate market'),
  19. User::TYPE_AGENT => tc('Specialists the real estate market'),
  20. ];
  21.  
  22. $titleFormat = tc('%s');
  23. $this->pageTitle = sprintf(
  24. $titleFormat,
  25. mb_strtolower($multiples[$type])
  26. ) . ': ' . tt('official website, ads', 'users') . НPage::pageString('page');
  27.  
  28. if (array_key_exists($type, $descriptions)) {
  29. $this->pageDescription = $descriptions[$type];
  30. }
  31.  
  32. } else {
  33. $this->pageTitle = tc('Subjects of the real estate market');
  34. $this->pageDescription = tt('All users list description', 'users');
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement