SimplePortal

Customization => Themes and Graphics => Topic started by: Sam12345 on December 06, 2010, 10:57:51 AM

Title: Custom Title for Front Page
Post by: Sam12345 on December 06, 2010, 10:57:51 AM
Hello all
I am in the process of creating a front page for my form at www.clinicalresearchsociety.org  and this means that my forum is not accessible at www.clinicalresearchsociety.org/forum/. I noticed that the title of the page for both the front page and the forum is the same. My forum name is a long one and has many key words in it. I would like it to be the title for my forum page  but for the front page I would like to create a custom title so search engines treat it in a unique fashion. Can this be achieved and how? Thanks in advance for your help.
Regards
Sam
Title: Re: Custom Title for Front Page
Post by: AngelinaBelle on December 06, 2010, 12:16:34 PM
I think it might make sense to change this in PortalMain.php, in function sportal_main(), which controls the contents of the portal page.
Code: [Select]
$context['page_title'] = $context['forum_name'];

You could use some other variable or hard-coded string instead of $context['forum_name']
Title: Re: Custom Title for Front Page
Post by: Sam12345 on December 06, 2010, 12:44:45 PM
Can't find PortalMain.php. Where could it be located?
Thanks
Title: Re: Custom Title for Front Page
Post by: AngelinaBelle on December 06, 2010, 02:56:07 PM
PortalMain.php should be in Sources
Title: Re: Custom Title for Front Page
Post by: Sam12345 on December 08, 2010, 08:54:01 AM
Thanks for the continued assistance. You could perhaps give me a step guide as to how to achieve this. I am a newbie when it comes to php programming although I have been running a popular smf forum for three years.
Regards
Sam
Title: Re: Custom Title for Front Page
Post by: AngelinaBelle on December 08, 2010, 11:44:25 AM
Code: (find) [Select]
$context['page_title'] = $context['forum_name'];
Code: (replace) [Select]
$context['page_title'] = 'The New and very much shorter title for this portal page, which is better for SEO and everything else";

http://w3schools.com/php/ (http://w3schools.com/php/) is a very helpful resource.
Title: Re: Custom Title for Front Page
Post by: Sam12345 on December 10, 2010, 09:59:04 AM
Thanks so much. Will implement.
Regards
Sam
Title: Re: Custom Title for Front Page
Post by: DrZux on February 26, 2011, 06:18:07 AM
Fantastic, worked like a charm.  :D
SimplePortal 2.3.8 © 2008-2024, SimplePortal