1
arnoweb
Personalize <title> and meta description for a page
  • 2008/11/19 17:01

  • arnoweb

  • Just popping in

  • Posts: 5

  • Since: 2007/9/1 2


Hello,

I've developped new pages for my XOOPS websites
These pages are independant of modules.

I have simply used the classical method:
include("mainfile.php")
include("header.php")

include("footer.php")


I cannot attribute any <title> or metas description because it's not a module. I absolutely need to personalize them.

Can you help me ?

Thanks a lot.

2
JulioNC
Re: Personalize <title> and meta description for a page
  • 2008/11/19 17:26

  • JulioNC

  • Quite a regular

  • Posts: 239

  • Since: 2004/10/8


example.com/my_page.php

<?php

$xoopsOption
['pagetype'] = 'my_page';
include 
'mainfile.php';

include_once 
XOOPS_ROOT_PATH . '/header.php';
$xoopsTpl->assign('xoops_pagetitle', 'My page title here');
$xoTheme->addMeta( 'meta', 'keywords', 'My keywords here');
$xoTheme->addMeta( 'meta', 'description', 'My description here');

include_once 
XOOPS_ROOT_PATH . '/footer.php';

?>

3
arnoweb
Re: Personalize <title> and meta description for a page
  • 2008/11/20 12:07

  • arnoweb

  • Just popping in

  • Posts: 5

  • Since: 2007/9/1 2


Thanks a lot !

It perfectly works.