web design, England, Britain, UK, belgium
 

Display Meta Tags in your Joomla Content - Joomla & VirtueMart Tips & How To's

Raise your keyword count in your Joomla content for the Search Engines by using native Joomla 1.5 calls JFactory::getDocument, getTitle & getMetaData to display the meta-keywords and meta-descriptions somewhere on your page.

Home Joomla VirtueMart Tips Display Meta Tags in your Joomla Content

Wed

08

Apr

Display Meta Tags in your Joomla Content
  • Joomla 1.5
  • Template

To raise your keyword count in your Joomla content for the Search Engines you can use native Joomla 1.5 calls to display the meta-keywords and meta-descriptions somewhere on your page.

This is a similar technique as Tag Clouds but has the advantage of being totally controllable by the author, the input fields are already present in the Joomla installation and the content appears as full sentences rather than a series of keywords.

This would normally be done "below the cut" and can give a nice boost to your search engines keyword count if you use unique meta data for each article.

Joomla show metatags in content To do this we make use of the native Joomla 1.5 function getMetaData().
We can also use the getTitle() function to display the html title tag.
First assign the current document to var $document..
$document=& JFactory::getDocument();
Then call and display the the required pieces of content..
$title = $document->getTitle();
echo '<br/><br/><h4>'.$title.'</h4><br/><br/>';
$metadesc = $document->getMetaData('description');
echo '<p>'.$metadesc.'</p><br/>';
$metakeywords = $document->getMetaData('keywords');
echo '<p>'.$metakeywords.'</p>';


You would put this code in the position in the template that you want the information to appear
and surround it in a div so that you can style the end result.
So putting it all together we would have the code below..
<div class="bottomtext"> <?php
$document=& JFactory::getDocument();
$title = $document->getTitle();
echo '<br/><br/><h4>'.$title.'</h4><br/><br/>';
$metadesc = $document->getMetaData('description');
echo '<p>'.$metadesc.'</p><br/>';
$metakeywords = $document->getMetaData('keywords');
echo '<p>'.$metakeywords.'</p>';
?>
</div>
Joomla display metatags in content
Last Updated on Sunday, 10 May 2009 09:59
 
VirtueMart
Your Cart is currently empty.

Latest Joomla & VirtueMart Tips

See all tips & examples



Display Meta Tags in your Joomla Content|Joomla & VirtueMart Tips & How To's



Raise your keyword count in your Joomla content for the Search Engines by using native Joomla 1.5 calls JFactory::getDocument, getTitle & getMetaData to display the meta-keywords and meta-descriptions somewhere on your page.


document, echo, joomla, getmetadata, title, metadesc, use, metakeywords, keywords, gettitle, meta, display, content, code, search, keyword, template, count, description, tag, function, native, engines, var, jfactory, getdocument, html, current, assign, appear, style, end, result, putting, div, surround, pieces, position, information, required

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.