Remove Page Title Keep Category Title

Phoca Gallery - image gallery extension
likestuff
Phoca Professional
Phoca Professional
Posts: 184
Joined: 18 Jul 2008, 03:06

Remove Page Title Keep Category Title

Post by likestuff »

I'm trying to remove the page title from the category but when I do so from the "Parameters (Basic)" it removes the entire title. On the "List of Categories" page, the first page shows the titles ok, but when I click on a category the title looks like this:

Photo Gallery - Meeting at The Hilton Hotel (March 23, 2010)

What I want is:
Meeting at The Hilton Hotel (March 23, 2010)

I searched the forum but couldn't find an answer.

Thanks!!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49149
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Remove Page Title Keep Category Title

Post by Jan »

Hi, you can set if only title of category or title of menu link + title of category will be displayed, see the Parameters System too.
If you find Phoca extensions useful, please support the project
likestuff
Phoca Professional
Phoca Professional
Posts: 184
Joined: 18 Jul 2008, 03:06

Re: Remove Page Title Keep Category Title

Post by likestuff »

Hi Jan,

I must be a real blind bat :( I don't see the option to show ONLY the category name. I'm making these changes via the MENU.

Under Parameters (System)
- When I select Yes to "Show Page Title", I get this:
Photo Gallery - Meeting at The Hilton Hotel (March 23, 2010)

- When I select No to "Show Page Title", nothing shows - it's blank.

Under Parameters (Basic)
- When I choose "Hide" next to "Display Category Name in Page Title", I get this:
Photo Gallery
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49149
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Remove Page Title Keep Category Title

Post by Jan »

Hi, page title should be empty (parameters system)
Show page title should be set to YES (parameters system)

and Display Category Name in Page Title should be set to YES (in parameters basic)

In PHP language:

Code: Select all

// Heading
$heading = '';
if ($this->params->get( 'page_title' ) != '') {
    $heading .= $this->params->get( 'page_title' );
}
if ( $this->tmpl['displaycatnametitle'] == 1) {
    if ($this->category->title != '') {
        if ($heading != '') {
            $heading .= ' - ';
        }
        $heading .= $this->category->title;
    }
}
// Pagetitle
if ($this->tmpl['showpagetitle'] != 0) {
    if ( $heading != '') {
        echo '<div class="componentheading'.$this->params->get( 'pageclass_sfx' ).'">'.$heading.'</div>';
    } 
}
 
If you find Phoca extensions useful, please support the project
Post Reply