page number in title

Phoca Gallery - image gallery extension
HiopsNerevar
Phoca Member
Phoca Member
Posts: 32
Joined: 17 Feb 2011, 18:08
Location: Russia
Contact:

page number in title

Post by HiopsNerevar »

Hi Jan! I insert page number in the title (Google complained of the same title), but I don't know how to make the code checks if Pagination enabled. Because of this there is a small error is displayed: "sitename - category - " but i need "sitename - category " wthisout a dash at the end of.

My code

Code: Select all

if (isset($category->title) && $category->title != '') {
$title = $title .' - ' .  $category->title .' - ' . $this->tmpl['pagination']->getPagesCounter();
}
Kind regards,
HiopsNerevar
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: page number in title

Post by Jan »

components/com_phocagallery/views/category/tmpl/default.php
If you find Phoca extensions useful, please support the project
HiopsNerevar
Phoca Member
Phoca Member
Posts: 32
Joined: 17 Feb 2011, 18:08
Location: Russia
Contact:

Re: page number in title

Post by HiopsNerevar »

Sorrry. I change /components/com_phocagallery/views/category/view.html.php on 2223 line. But I want to code check there pagination on page and if yes output my code or if no output your code.

Exaple:

Code: Select all

if (isset($category->title) && $category->title != '') {
$title = $title .' - ' .  $category->title;	} 
esle if (isset($category->title) && $category->title != '' && THIS CHECK PAGINATION ON PAGE) {
$title = $title .' - ' .  $category->title .' - ' . $this->tmpl['pagination']->getPagesCounter();
} 
:idea:

ps.
http://dragonsun.ru/galereya/category/6-3d-drakony.html page without pagination and "-" on the end
http://dragonsun.ru/galereya/category/9 ... akony.html with pagination
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: page number in title

Post by Jan »

Hi, check if the menu link to first category has set it in parameters (if you disable the SEF, you will see Itemid, which is ID of the menu link and they you can test, if such menu link includes pagination feature - if it is enabled)

Jan
If you find Phoca extensions useful, please support the project
Post Reply