SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)

How can I control what title tag information is displayed for <{$xoops_pagetitle}> in the header.php?
  Requested and Answered by Carnuke on 2004/12/20 20:21:33     8247  reads 
XoopsTpl API Docs The default theme (and most other themes) has this line in the theme smarty file (theme.html)
<title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
Which tells the Smarty Template Engine to take the assigned values for xoops_sitename and xoops_pagetitle and add them in the title. "Where do those values get filled?" you may ask. The answer is they are filled in header.php:
$xoopsTpl->assign('xoops_pagetitle'$xoopsModule->getVar('name'));
Before you run off to header.php to mess with these lines, let me ask a question. What information are you wanting to put in the page title? If it is an article, you probably want to put the article title up there, if it is a forum post, you probably want the name of the thread up there. If this is the case, the proper way to deal with this problem is to add a line in the module page you want to modify:
$xoopsTpl->assign('xoops_pagetitle''Your Page Title');
You'll find that XOOPS gives full control over the title tag (being that it is a variable that an application can modify), but the modules themselves need to assign relevant information to the template.


The comments are owned by the author. We aren't responsible for their content.
user

 Help me please


What file do i add this line to?

Quote:

$xoopsTpl->assign('xoops_pagetitle', 'Your Page Title');


I really confused and i dont know where im ment to add this line to make my my news titles to appear in the page titles

 
user

 Re: Help me please


bugmenot:

Please read the answer provided here. You'll need to adapt it to your needs, of course, but I hope It'll make things clear.

Cheers.

 


Login

Username:
Password:

Lost Password? Register now!

Who's Online

79 user(s) are online (1 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 79


more...

Donat-O-Meter

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

Did you know ?

You can change dates and time formats in xoops?

Random question

Can I charge for my services?