Jump to content

SEO <title> plugin, exist ?


alishaantony
 Share

Recommended Posts

Hi alishaantony, welcome!
Which plugin do you mean exactly?

I suggest to read through the docs first.

It's as simple as this:

// In template where your html markup is, we output the title of each page in the <title> tag
<title><?= $page->title ?></title>
  • Like 3
Link to comment
Share on other sites

To give you some ideas, here is what I do.

I append my site name to the end of every <title>, it helps with SEO, bookmarks, etc.

OrganizedFellow.com

To the left of that I prepend the category name, whether it be Blog/Article, Products, Contact Page, About, etc.

Blog | OrganizedFellow.com

To the left of that I prepend the title of the page itself.

I took up jogging | Blog | OrganizedFellow.com

Contact Me | organizedfellow.com

Screws and Nails | Products | OrganizedFellow.com

There is no ONE way. Feel free to do it how you like.

  • Like 3
Link to comment
Share on other sites

I do something very similar to OrganizedFellow - 

<title>
<?php
    echo $page->get("headline|title");
    if($page->url !== $config->urls->root) echo " | Site Title";
?>
</title>

Just change 'Site Title' as appropriate.

  • Like 1
Link to comment
Share on other sites

I've been experimenting with something similar.

For now I use the prependTemplateFile and I've changed my homepage fields/template set-up. Actually my homepage is my 'settings-page'... 

In the _init.php I use:

$sitename 	= $pages->get(1)->site_name;
$telephone 	= $pages->get(1)->site_tel;
$siteslogan	= $pages->get(1)->site_slogan;

that way I did some facebook stuff etc... image etc...

if ($page->get('news_mainImage') != ''){
		$thumb = $page->news_mainImage->getThumb(thumbnail);
		$fbImage = 'http://'.$config->httpHost;
		$fbImage .=$thumb;
	//	$fbImage =$page->news_mainImage->httpUrl; doesn t work?
	}else{
		$fbImage = 'http://'.$config->httpHost;
		$fbImage .= $config->urls->root;
		$fbImage .= 'site/templates/styles/images/logo.png';	
	} 

That way I can use whatever I want whenever I need and if I made a mistake [e.g. phonenumber has to be changed], only one field has be corrected in the back-end...

<title><?php echo $page->get('pagetitle|title'); ?> :: <?php echo $sitename; ?> :: <?php echo $siteslogan; ?></title>

the only thing I was wondering... since I'm using it in my "init" file, maybe I should use 'auto join' fields... but that's for later... still experimenting...

Am I on the right track, or am I overdoing it?

Grtz!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...