- Posts: 19
COMMUNITY FORUM
Custom Page Title
- ak2user
- Offline
- New Member
Less
More
13 years 11 months ago #81488
by ak2user
Replied by ak2user on topic Custom Page Title
It's view.html.php.
Please Log in or Create an account to join the conversation.
- Daphne Christoforidou
- Offline
- New Member
Less
More
- Posts: 14
13 years 6 months ago #81489
by Daphne Christoforidou
Replied by Daphne Christoforidou on topic Custom Page Title
Thanks for this fix John. The code
$params->set('page_title', $item->cleanTitle);
appears on line 233 and 236. Is it ok if we replace it in both cases or do we just have to replace line 236 and not line 233? I'm pasting the whole if clause here for anyone interested (it's after I applied the fix and as you can see I have commented out both line 233 and 236 and replaced them) :
//Set page title $menus = &JSite::getMenu(); $menu = $menus->getActive(); if (is_object($menu) && isset($menu->query) && $menu->query == 'item' && isset($menu->query) && $menu->query == $item->id) { $menu_params = new JParameter($menu->params); if (!$menu_params->get('page_title')) { //$params->set('page_title', $item->cleanTitle); $params->set('page_title', $item->cleanTitle . ' | ' . $item->category->name); } } else { //$params->set('page_title', $item->cleanTitle); $params->set('page_title', $item->cleanTitle . ' | ' . $item->category->name); } $document->setTitle($params->get('page_title'));
$params->set('page_title', $item->cleanTitle);
appears on line 233 and 236. Is it ok if we replace it in both cases or do we just have to replace line 236 and not line 233? I'm pasting the whole if clause here for anyone interested (it's after I applied the fix and as you can see I have commented out both line 233 and 236 and replaced them) :
//Set page title $menus = &JSite::getMenu(); $menu = $menus->getActive(); if (is_object($menu) && isset($menu->query) && $menu->query == 'item' && isset($menu->query) && $menu->query == $item->id) { $menu_params = new JParameter($menu->params); if (!$menu_params->get('page_title')) { //$params->set('page_title', $item->cleanTitle); $params->set('page_title', $item->cleanTitle . ' | ' . $item->category->name); } } else { //$params->set('page_title', $item->cleanTitle); $params->set('page_title', $item->cleanTitle . ' | ' . $item->category->name); } $document->setTitle($params->get('page_title'));
Please Log in or Create an account to join the conversation.
- rexkramer
- Offline
- Senior Member
Less
More
- Posts: 71
13 years 6 months ago #81490
by rexkramer
Replied by rexkramer on topic Custom Page Title
just found this older thread today, if someone is still interested in this topic ;-)
iJoomla SEO does support K2 and many other components.
iJoomla SEO does support K2 and many other components.
Please Log in or Create an account to join the conversation.
- matt haeck
- Offline
- New Member
Less
More
- Posts: 2
13 years 5 months ago #81491
by matt haeck
Replied by matt haeck on topic Custom Page Title
This was giving me problems too - Once I got it figured out I made a quick post on my blog. Hope it helps someone.
Please Log in or Create an account to join the conversation.
- rosy jenith
- Offline
- New Member
Less
More
- Posts: 2
13 years 1 month ago #81492
by rosy jenith
Replied by rosy jenith on topic Custom Page Title
yet i have not tried, you must try once if possible then its would be great and let me know when done? Novoline
Please Log in or Create an account to join the conversation.
- Dave W
- Offline
- New Member
Less
More
- Posts: 9
11 years 1 month ago #81493
by Dave W
Replied by Dave W on topic Re: Custom Page Title
Using file: view.html.php
Comment out or remove Line 248.
Replace with: $params->set('page_title', $item->cleanTitle . ' - ' . $item->category->name);
Line 248: // $params->set('page_title', $item->cleanTitle);
$params->set('page_title', $item->cleanTitle . ' - ' . $item->category->name);
Comment out or remove Line 248.
Replace with: $params->set('page_title', $item->cleanTitle . ' - ' . $item->category->name);
Line 248: // $params->set('page_title', $item->cleanTitle);
$params->set('page_title', $item->cleanTitle . ' - ' . $item->category->name);
Please Log in or Create an account to join the conversation.