web design, England, Britain, UK, belgium
 
Ulti Clocks content

Display Meta Tags in your Joomla Content

GJC Web Design UK Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help sand 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

Home Joomla - VirtueMart Joomla & VM How To's 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


Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
Last Updated on Sunday, 10 May 2009 09:59
 

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
  The word for verification.
Lowercase letters only with no spaces.

The word for verification.<br/>Lowercase letters only with no spaces.
Word verification:

Subject:
Comment:
Comments (3)
What code can you use in Joomla 2.5?
3 Thursday, 19 April 2012 23:44
Lee Tempest
Any idea how to replicate this in Joomla 2.5?

I tried the code above bu just get an error.

Please help!

Thanks
Thank you
2 Thursday, 03 February 2011 06:51
Nookeen
You're awesome man! Thank you so much!!!
Article
1 Thursday, 15 July 2010 14:24
David
Good tutorial, but is it possible to display the article's title in content?
Thanks.

Our Recommended Reading

For those interested in extending their knowledge of Joomla! & VirtueMart, Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.


Joomla! Social Networking with JomSocial
Joomla! Social Networking
with JomSocial

by Kwasi Boateng & Beatrice A. Boateng.
Joomla! 1.5 Multimedia
Joomla! 1.5 Multimedia
by Allan Walker.


Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
Joomla! Template Design: 2nd Edition
Create your own professional-quality
templates with this fast, friendly guide
by Tessa Blakeley Silver.
Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

object-oriented-javascript-applications-libraries
Object-Oriented JavaScript by
Stoyan Stefanov gives you a very
comprehensive grounding in
the latest Javascript techniques.

Read the review
Joomla! Web Security
Joomla! Web Security
by Tom Canavan.

Joomla 1.5 Top Extensions Cookbook
Joomla 1.5 Top Extensions Cookbook by
Suhreed Sarkar is an ideal and concise round up of the extensions available for the Joomla! system.

Read the review

Latest Articles

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

VM Live Product Search

Recommended Reading

For those interested in extending there knowledge of Joomla! & VirtueMart Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.

Mastering Joomla! 1.5 Extension and Framework Development
Mastering Joomla! 1.5 Extension and
Framework Development : 2nd Edition

by James Kennard.
Read the review

Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.
Learning Joomla! 1.5 Extension Development Learning Joomla! 1.5 Extension Development
by Joseph L. LeBlanc.
Read the review
Joomla! E-Commerce with VirtueMart
Joomla! E-Commerce with VirtueMart
by Suhreed Sarkar.

Read the review
Joomla! 1.5 Site Blueprints Joomla! 1.5 Site Blueprints
by Timi Ogunjobi.

Joomla! 1.5 JavaScript jQuery Joomla! 1.5 JavaScript jQuery
by Jose Argudo Blanco.
Read the review
Joomla! Social Networking with JomSocial Joomla! Social Networking with JomSocial
by Kwasi Boateng & Beatrice A. Boateng.

Joomla! 1.5 Multimedia Joomla! 1.5 Multimedia
by Allan Walker.

Joomla! Web Security Joomla! Web Security
by Tom Canavan.

Mastering Joomla! 1.5 Extension and Framework Development Mastering Joomla! 1.5 Extension and Framework Development : 2nd Edition
by James Kennard.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide Joomla! Template Design: Edition 2 - Create your own professional-quality templates with this fast, friendly guide
by Tessa Blakeley Silver.

Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

GJC Web Design UK Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help



Display Meta Tags in your Joomla Content



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