Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pagetitle = $modx->documentObject['pagetitle'];
- $longtitle = $modx->documentObject['longtitle'];
- $template = $modx->documentObject['template'];
- $tv_title = $modx->documentObject['tv_title'][1];
- $title = '';
- if($template == 9 || $template == 7) {
- $title .= 'Nice ';
- }
- if($tv_title) {
- $title .= $tv_title;
- } else {
- if($longtitle) {
- $title .= $pagetitle .' — '. trim(str_replace($pagetitle, '', $longtitle));
- } else {
- $title .= $pagetitle;
- }
- }
- $tag = isset($_GET['tag']) && !is_array($_GET['tag']) ? urldecode($_GET['tag']) : '';
- if($tag) {
- $title .= ' | '. $tag;
- }
- echo $title;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement