Jump to content

Meta Tıtle,Desc and Keywords in detail view


Guest dojunk

Recommended Posts

Searching this forum for ood seo, I found this article and apply to my system..Thanks to BigDutch#2..

 

http://www.reviewsforjoomla.com/option,com_smf/Itemid,34/topic,5501.0/

 

So I come up with this codes..

/**********************************************************************************
* 								META DATA
**********************************************************************************/
$separator = ',';
$separator2 = 'aaaaaa,bbbbbb,ccccccc,ddddddd';
$introtextlimit = $Text->truncate($listing['Listing']['text'],100,',');

$newmetatitle = $listing['Listing']['title']. ',' .$separator2;
$newmetakey = $listing['Listing']['title']. ',' .$separator2; 
$newmetadesc = $listing['Listing']['title']. '-' .$newmetakey. '-' .$introtextlimit;

cmsFramework::meta('title', $newmetatitle);
cmsFramework::meta('description',$newmetadesc);
cmsFramework::meta('keywords',$newmetakey);

if($this->action == 'detail' || $this->action == 'view') {
if(Configure::read('Cache.enable') && Configure::read('Cache.view')){
	if($cachedMeta = S2Cache::read('meta_'.md5($this->here))) {
		$listing = $cachedMeta;
	} else {
		S2Cache::write('meta_'.md5($this->here),array('Listing'=>array('title'=>$listing['Listing']['title'],'metakey'=>$listing['Listing']['metakey'],'metadesc'=>$listing['Listing']['metadesc'])),Configure::read('Cache.expires'));
	}
}	
cmsFramework::meta('title', $listing['Listing']['title']);
cmsFramework::meta('keywords',$listing['Listing']['metakey']);
cmsFramework::meta('description',$listing['Listing']['metadesc']);
}
?>

</s2:nocache>

 

Here is my questions about it..

 

1. I can't be able to add some custom text to title (seperator2 example)..Meta just shows default title..How Can i manage to do it?

 

2. When I view my listing article's source code, I see that title is well placed in description (twice)..But search engines crawls my article with no title in description at all.. If I am not misaken it started to happen when I enable the jreviews cache..It is %90 because of this but I need that cache feature to reduce my server load..How can we manage to it?

 

P.s: I have written different metas for each of my categories..For some reason some metas work corectly..

 

Please advice..

 

Link to comment
×
×
  • Create New...