Wed 08 Apr |
|
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. 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> |
Last Updated on Sunday, 10 May 2009 09:59 |