Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
5 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Easiest way to add custom page title, keywords & description to blank module?
by jeffgr on 2007/9/21 19:55:38

I just wanted to add on to this thread that I have seen a significant, positive change in my search engine results for pages in which I have used this new "blank module". Search engines really do like those page titles, keywords and page description tags...

jeffgr


http://www.XoopsExperts.com
Re: Easiest way to add custom page title, keywords & description to blank module?
by jeffgr on 2007/9/12 19:55:14

I have zipped up my version of the PageWrap module for you to download here:

http://xoopsexperts.com/modules/downloads/

My version of this module contains the code discussed in this thread, which will allow you to give the a unique page title, meta keywords, and meta description tag to the index.php file of this blank module. This will help you get the content that you put in this module to rank well with search engines.

I have also commented the code a bit more as well.

I renamed the module version 2.0 as well.

I added your name, Bandit-X, to the credits, hope you don't mind. :)

Enjoy!

jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
by jeffgr on 2007/9/12 16:39:29

Yes, this worked, thanks!

So...this is the code that I am now using in my index.php file:

<?php if (file_exists("mainfile.php")) { include("mainfile.php"); } elseif (file_exists("../mainfile.php")) { include("../mainfile.php"); } else { include("../../mainfile.php"); } include(XOOPS_ROOT_PATH."/header.php"); $xoopsTpl->assign( 'xoops_showrblock', 1); // 1 = With right block - 0 = Without right block $xoopsTpl->assign( 'xoops_showlblock', 0); // 1 = With left block - 0 = Without left block ?>  HTML CONTENT GOES HERE <?php if(isset($xoTheme) && is_object($xoTheme)) { $xoTheme->addMeta( 'meta', 'keywords', "keyword, keyword, keyword, keyword"); $xoTheme->addMeta( 'meta', 'description', "This is the page description"); $xoopsTpl->assign('xoops_sitename','This is the page title'); } include(XOOPS_ROOT_PATH."/footer.php"); ?>


Thanks again

jeffgr
Re: Easiest way to add custom page title, keywords & description to blank module?
by iHackCode on 2007/9/12 15:33:33

le="color: #000000"><?php $xoopsTpl->assign('xoops_sitename','');


most themes use both tags in the title. but you may also have an - before your title . due to the theme.
Re: Easiest way to add custom page title, keywords & description to blank module?
by jeffgr on 2007/9/12 14:44:20

That works to change the meta keywords & description, thanks!

Bu what about the page title tag? At the moment, I have this code, which I am including in the blank module index page:

$xoopsTpl->assign('xoops_pagetitle', 'this is my page title');

This seems to add on the "this is my page title AFTER the default XOOPS site-wide page title.

But how might I remove the site-wide page title from showing, so that I only see the custom title that I add for this page

(which will give better SEO results)

Thanks,

jeffgr

Who's Online

157 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 157


more...

Donat-O-Meter

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

Latest GitHub Commits