The Joomla! Forum ™






Post new topic Reply to topic  [ 27 posts ] 
Author Message
PostPosted: Fri Jan 29, 2010 5:02 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sat Oct 18, 2008 3:02 am
Posts: 8772
Location: Mars
Hi Folks ;)

I have question regarding Meta description
How to put Meta Description in Component ? is it possible ?
because on Google Webmaster I found duplicate meta description on these pages :
- www.domain.com/contact-us.html
- www.domain.com/sitemap.html

As we know that Contact us and Sitemap is component, not article
Joomla's default SEO doesn't have feature for do this and I've checked on JED but there is no extension that can do this. As we know that duplicate meta decription have affect for reduce site Rank, especially Google

This time, for fix it I'm using this method : Embed component in Article and then put Meta description from Article manager, but i want to insert meta descripton in Component directly. How can i do this ?

Thanks in advance ;)


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 7:36 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
http://extensions.joomla.org/extensions/site-management/seo-a-metadata/1830 places separate Meta data for each page. Any duplicates then are down to duplicate pages in the sitemap.

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 7:58 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Dec 08, 2006 3:33 am
Posts: 4148
Location: Budva, Montenegro
Hi Ghonjez :),

You can use a trick with template overrides. For contact page, make com_contact in yourtemplate/html/ folder and put right after defined( '_JEXEC' ) or die( 'Restricted access' );:

Code:
$document =& JFactory::getDocument();
$document->setDescription("Here your desired description");


For sitemap you can use following trick. In your template in index.php right after include_once...:
Code:
if (JRequest::getVar('option')=='com_content')  {
$document->setDescription("Here your desired description");
}

Change com_content with sitemaps com_something...

_________________
Dental Tourism: http://yourdentaltravel.com/
Tourist Agency in Montenegro: http://www.mareblu.me
Miljan Vujosevic - Follow me on Twitter @Leftfield


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 8:21 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Dec 20, 2009 10:19 am
Posts: 42
Location: Kyiv, Ukraine
Oh! Where is brian? :)

Thanks Leftfield! I'll plan seo of new site with own component. Your suggesting is decision of problem. As far as I understand it belongs to keywords too (setKeywords).

_________________
Joomla SEO — http://webworld.com.ua


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 8:56 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
@Leftfield
But if that was put in the Template's index.php file would that only duplicate "your defined" text on all the pages ?

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 9:10 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Dec 08, 2006 3:33 am
Posts: 4148
Location: Budva, Montenegro
No it wouldn't, because there is IF statement. I sad it is enough to change com_content with idk, com_sitemap and it is just for one page.

Maybe Ghonjez doesn't use any 3rd SEF extensions and this is good trick for individual pages with duplicate description :).

_________________
Dental Tourism: http://yourdentaltravel.com/
Tourist Agency in Montenegro: http://www.mareblu.me
Miljan Vujosevic - Follow me on Twitter @Leftfield


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 9:24 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
I see what you mean but would using a Dynamic extension be easier and also (being automatic) negate the need to make further changes ?

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 9:24 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jan 29, 2010 9:14 pm
Posts: 1
Thanks for the replies, was just looking for something, I'm still new to the Joomla, used another platform before, I am studying a bit before migrating my blog to Joomla.

_________________
SiSU Mec
http://www.sisumec.net


Top
 Profile  
 
PostPosted: Fri Jan 29, 2010 9:45 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Dec 08, 2006 3:33 am
Posts: 4148
Location: Budva, Montenegro
@Webdongle whatever component i use or not, i always make manually meta descriptions.

@sisumec Welcome to the Forum :)

_________________
Dental Tourism: http://yourdentaltravel.com/
Tourist Agency in Montenegro: http://www.mareblu.me
Miljan Vujosevic - Follow me on Twitter @Leftfield


Top
 Profile  
 
PostPosted: Sat Jan 30, 2010 5:54 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sat Oct 18, 2008 3:02 am
Posts: 8772
Location: Mars
Hi...

Thanks very much for your reply
I will try all your suggestion

regards ;)


Top
 Profile  
 
PostPosted: Mon Oct 25, 2010 1:45 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 29, 2010 3:30 am
Posts: 68
I have a lot of components I would like to do this for... and I am NOT a programmer so I have little knowledge when it comes to changing code, etc. ??? Is there an extension I can use? ??? I have seen extensions for category and section Meta data...
Please help! :eek:

(Note: Gary's Cookbook is the WORST because GARY is plastered on everything and if you are new to sit building - it is horrible to fix! This is the component that has me wanting to change meta data more than ever!) >:(

_________________
New to Joomla! but trying really hard to figure things out on my own! If I am asking here, I am likely frustrated, embarrassed or otherwise not happy. Please be easy on me and I will try to get back to it on my own without being a pest. ;)


Top
 Profile  
 
PostPosted: Mon Oct 25, 2010 1:52 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Oct 19, 2010 1:22 pm
Posts: 6
Ghonjez wrote:
Hi Folks ;)

I have question regarding Meta description
How to put Meta Description in Component ? is it possible ?
because on Google Webmaster I found duplicate meta description on these pages :
- www.domain.com/contact-us.html
- www.domain.com/sitemap.html

Why do you need to put meta description at all? It isn't important for SEO :)


Top
 Profile  
 
PostPosted: Mon Oct 25, 2010 6:15 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 29, 2010 3:30 am
Posts: 68
itrdeveloper - Maybe you will have my answer!
When anybody shares my site on a social network or other place that generates a preview based on page title and meta description, some components (Gary's Cook Book for example >:( ) share the page with the component title and main site metadescription and I have NO CLUE how to fix it! :'(
How confusing is that to the people looking at the post when they click the link and the page has a totally different title, etc?

I know it's a free component but come on! When a component works appropriately, I donate. When I spend hours pulling my hair out and get no developer help... well...

I hope this is a simple question for you!

_________________
New to Joomla! but trying really hard to figure things out on my own! If I am asking here, I am likely frustrated, embarrassed or otherwise not happy. Please be easy on me and I will try to get back to it on my own without being a pest. ;)


Top
 Profile  
 
PostPosted: Sat Oct 30, 2010 4:15 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sat Oct 18, 2008 3:02 am
Posts: 8772
Location: Mars
itrdeveloper wrote:
Ghonjez wrote:
Hi Folks ;)

I have question regarding Meta description
How to put Meta Description in Component ? is it possible ?
because on Google Webmaster I found duplicate meta description on these pages :
- http://www.domain.com/contact-us.html
- http://www.domain.com/sitemap.html

Why do you need to put meta description at all? It isn't important for SEO :)

For avoid "duplicate" meta description in the Google Webmaster and this is useful for increase SEO.

:)


Top
 Profile  
 
PostPosted: Sun Oct 31, 2010 12:39 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 29, 2010 3:30 am
Posts: 68
Ghonjez-
What solutions do you suggest for component meta description?

_________________
New to Joomla! but trying really hard to figure things out on my own! If I am asking here, I am likely frustrated, embarrassed or otherwise not happy. Please be easy on me and I will try to get back to it on my own without being a pest. ;)


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 4:08 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 10, 2010 3:08 am
Posts: 6
Location: Australia
RS SEO or SH404SEF would be an excellent GO TO components. Its a one time investment but very good for Meta Tags and 404 error pages etc.

_________________
Web Design http://www.woocom.com.au/website-design.html
IT Network Solutions http://www.justlogical.com.au/network-solutions.html


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 1:00 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 29, 2010 3:30 am
Posts: 68
I had a lot of issues with SH404SEF (I actually paid for it with JCalPro I believe). Maybe I will look into RS SEO. Thanks!

_________________
New to Joomla! but trying really hard to figure things out on my own! If I am asking here, I am likely frustrated, embarrassed or otherwise not happy. Please be easy on me and I will try to get back to it on my own without being a pest. ;)


Top
 Profile  
 
PostPosted: Mon Nov 01, 2010 1:04 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
Acesef and Joomsef are both good

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Sat Jun 11, 2011 9:45 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jun 11, 2011 9:32 am
Posts: 7
Leftfield wrote:
You can use a trick with template overrides. For contact page, make com_contact in yourtemplate/html/ folder and put right after defined( '_JEXEC' ) or die( 'Restricted access' );:

Code:
$document =& JFactory::getDocument();
$document->setDescription("Here your desired description");


For sitemap you can use following trick. In your template in index.php right after include_once...:
Code:
if (JRequest::getVar('option')=='com_content')  {
$document->setDescription("Here your desired description");
}

Change com_content with sitemaps com_something...


Hi Leftfield,

I have the same problem as Ghonjez.

I am working with joomla 1.6, template Beez5.
for component: Chronoforms (folder name: com_chronoforms)
and components: com_flexicontact (folder name: com_flexicontact)

I am trying to reproduce the trick you are describing without success.
To adapt it to my situation I did add in index.php

Code:
if (JRequest::getVar('option')=='com_flexicontact')  {
$document->setDescription("Here your desired description");

if (JRequest::getVar('option')=='com_chronoforms')  {
$document->setDescription("Here your desired description");
}


But it doesnt work (the meta tag display the site main meta tag)
or the php code crash.

I cannot find in my index.php file anything like:

include_once


Could you help me to adapt it to my situation?


Thank you very much,

Eric


Last edited by ericerti on Sat Jun 11, 2011 12:11 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Jun 11, 2011 10:43 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jun 11, 2011 9:32 am
Posts: 7
Hello again,


For additional information, I am also using the language module, so actually, I need to be able to set 2 version of meta tag for each compoment.

Of course I am using menu, and meta tag description in the menu option, but this meta tag does not display. Only the main website meta tag does.

I think this is a bug since joomla is supose to display

website tag, or category tag if exist, or menu tag is exist, or article tag if exist.

don't you guy think so?


Top
 Profile  
 
PostPosted: Sun Jun 19, 2011 4:12 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jun 11, 2011 9:32 am
Posts: 7
found a work around by adding a little code in the index.php file of my template:

place it at the place of:

<jdoc:include type="head" />

-----------------

<!--[work around joomla component issue]-->
<jdoc:include type="head" />

<?php
$currentMenuId = JSite::getMenu()->getActive()->id ;
if($currentMenuId == '116') // 116 is the ID number of the menu pointing to the component
{
$this->setMetaData( 'description', 'my description' );
$this->setMetaData( 'keywords', 'my keyword' );
}
else
{
// do nothing
}
?>


Top
 Profile  
 
PostPosted: Tue Apr 17, 2012 10:42 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 08, 2012 9:09 am
Posts: 31
ericerti ;D
Thank you

This worked, any idea how I can do this dame thing with my blog page and a google map component?


Top
 Profile  
 
PostPosted: Sun May 20, 2012 10:50 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 08, 2012 9:09 am
Posts: 31
Hi

I have tried adding the above code in my index.php file of my template.
It solved the problem of duplicated meta description but I have another issue :'(
I have added the code for 3 components, but now when I view source on that page, I have the header repeating 3 times?
I am a little worried as a seo program has stated that having meta robot tags twice can be viewed as spamming attempt by search engines.
Please view the screen shot.
Thanks


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Mon May 21, 2012 10:10 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
Try a standard Template ?

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Mon May 21, 2012 10:27 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 08, 2012 9:09 am
Posts: 31
Can you please elaborate?
what do you mean try a standard Template?

If I use the standard index.php file then I am back to square 1. :'(
Which is the duplicate meta descriptions issue!
I was hoping is was a simple mistake made in the index.php file I have edited?

Your help is much appreciated.


Top
 Profile  
 
PostPosted: Mon May 21, 2012 10:31 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 23363
Location: @Webdongle
Abcplumb wrote:
...
I was hoping is was a simple mistake made in the index.php file I have edited?
...

Then you probably duplicated
<jdoc:include type="head" />

_________________
http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Tue May 22, 2012 12:07 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 08, 2012 9:09 am
Posts: 31
Thanks Webdongle

After hours of trying, I've managed to figure it out with your help.
I had to remove the following lines from the index.php file.

<!--[work around joomla component issue]-->
<jdoc:include type="head" />

This should have been only be at the top, at the beginning and not for every component.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group