http://www.xoops.org/
Main Menu
Latest Articles
Popular Articles

Browsing this Thread:   1 Anonymous Users





How do I get page titles for each event in AM Events?
Just popping in
Joined:
2005/8/30 9:45
Group:
Registered Users
Posts: 4
Level : 1; EXP : 21
HP : 0 / 5
MP : 1 / 316
Offline
Hi,

In AM events I would like each event to have its own page title. I've read this:

From Xoops Tips
Page Title <{$xoops_pagetitle}>
Page title plays a very important role in searching engine ranking. The stock Xoops distribution
by default assigns the module name as the page title for every pages of a particular module.
This definitely will not help you improve your ranking. Google and other search engines rely
heavily on page titles in page ranking all other factors considered. A page from PR5 site may
rank well ahead of a similar page from a PR7 site due to the simple fact that the page from PR5
has a page title with all relevant ?key words? while the PR7 page does not.
There are several hacks of implementing page titles. It may sound a daunting task in assigning
your own page title. It is really not complicated if you understand the working of Smarty.
You can just simply overwrite the Smarty variable at display-time with your own page title.
For example, if we want to display an individual download name as the page title under
singlefile.php.
We know from reading the file that $dtitle is assigned as the title of an individual download
name. Knowing this, now we can assign it as page title.
Add
$xoopsTpl->assign('xoops_pagetitle', $dtitle);
before
include XOOPS_ROOT_PATH.'/include/comment_view.php';
include XOOPS_ROOT_PATH.'/footer.php';
We now have a unique page title for every download. Very simple? It is and should be.


And I assumed the file to edit was am events index.php but no matter what I change I can't get it to work (it's a bit complex for me ) Does anyone know what I need to change to do this?

Posted on: 2005/8/30 11:10
Transfer the post to other applications Transfer


Re: How do I get page titles for each event in AM Events?
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 15425
Offline
Well, this will be in the next release and will work in the same way as it does in Articles.

But, if you cannot wait (I don't know how long it'll be before the next version is released), add the following line on or around line 124 of index.php:

$xoopsTpl->assign('xoops_pagetitle'$amevent['event_name']);


Which should be between:

$amevent['event_country']     = country($myrow['event_country']);


And:

$xoopsTpl->append_by_ref('amevents'$amevent);

Posted on: 2005/8/30 13:33
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer


Re: How do I get page titles for each event in AM Events?
Just popping in
Joined:
2005/8/30 9:45
Group:
Registered Users
Posts: 4
Level : 1; EXP : 21
HP : 0 / 5
MP : 1 / 316
Offline
Thank you! It works.
I shall look forward to the next version too.

Posted on: 2005/8/30 14:18
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Login
Username:

Password:

Remember me



Lost Password?

Register now!
Donate!
Please consider donating to help continued development of my XOOPs modules. Read more here.

Search
Advertisements
Copyright © 2001-2009 sirium.net