1
xoopie
News module page titles
  • 2005/9/1 2:18

  • xoopie

  • Just popping in

  • Posts: 9

  • Since: 2004/4/16


Hi,

I'm using the news module 1.4 and have it as the module on my homepage.

At the moment the page title which appears at the top of the screen reads as

Site Title - News Topic - Story Title - Module Name

How can I edit this so that it only reads as Site Title - Module Name ?

Google indexes the full page title which doesn't look good on the homepage.

Thanks.

2
davidthomas1
Re: News module page titles

You'd have to do a little PHP tweaking to this section of code

filenamemodules/news/index.php
linenumber
297-308
/**
 * Assign page's title
 */
if($firsttitle!='') {
    
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars($firsttitle) . ' - ' $myts->htmlSpecialChars($xoopsModule->name()));
} else {
    if(
$topictitle!='') {
        
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars($topictitle));
    } else {
        
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars($xoopsModule->name()));
    }
}


just change the values inside the htmlSpecialChars(...) function, careful to keep the closing brackets )) intact.

You could just take the simple route and add this line :

/**
 * Assign page's title
 */
if($firsttitle!='') {
    
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars($firsttitle) . ' - ' $myts->htmlSpecialChars($xoopsModule->name()));
} else {
    if(
$topictitle!='') {
        
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars($topictitle));
    } else {
        
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars($xoopsModule->name()));
    }
}
//add this line
$xoopsTpl->assign('xoops_pagetitle'$myts->htmlSpecialChars('My Website Name'));


after all the other if statements to set the pagetitle at the end, regardless of the flow of logic in the if statements. quick and dirty but it should get the job done.


good luck!

D.
みんなちがってみんないい。

XOOPS 2.0.13.2

3
xoopie
Re: News module page titles
  • 2005/9/1 10:44

  • xoopie

  • Just popping in

  • Posts: 9

  • Since: 2004/4/16


Thanks for your help

Login

Who's Online

164 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits