Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2. $pagetitle = $modx->documentObject['pagetitle'];
  3. $longtitle = $modx->documentObject['longtitle'];
  4. $template = $modx->documentObject['template'];
  5. $tv_title = $modx->documentObject['tv_title'][1];
  6. $title = '';
  7. if($template == 9 || $template == 7) {
  8. $title .= 'Nice ';
  9. }
  10. if($tv_title) {
  11. $title .= $tv_title;
  12. } else {
  13. if($longtitle) {
  14. $title .= $pagetitle .' — '. trim(str_replace($pagetitle, '', $longtitle));
  15. } else {
  16. $title .= $pagetitle;
  17. }
  18. }
  19. $tag = isset($_GET['tag']) && !is_array($_GET['tag']) ? urldecode($_GET['tag']) : '';
  20. if($tag) {
  21. $title .= ' | '. $tag;
  22. }
  23. echo $title;
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement