1
wishcraft
Page Descriptions & Keyword Density - SEO Tip #3

Well have you searched for your site, you will notice a lot of the pages have the same description, this means you are limiting the amount of possible keywords your search is going to be found on.

For the module writers there are a few steps to ensure that this isn't a problem, introduce a field called a Teaser and use this to populate the smarty variable xoops_meta_description this allows the user to populate a description that they want to be searched under, it only has to be around 128-250 chars a varchar will do.

The other alternative is to turn on an off and on the tag itself this is using a system of smarty if, for example in your theme you will have a line that looks like:

<meta name="description" content="<{$xoops_meta_description}>" />


You would want to change it to be contained within an if clause that is fired by your tpl variable in the modules you want the description left in..

For example, in your theme you would replace this with:

<{if $dontallow_meta_description==0}>
<
meta name="description" content="<{$xoops_meta_description}>" />
<{/if}>


now in the php files where you want the page content to be searchable by the search engines and display in the searching matrix you would add the following $tpl call.

$xoopsTpl->assign('dontallow_meta_description'true);


This will turn off the description tag and the search engines will use the page content or where the common keywords in the search term are found on the page.

Alternatively the teaser option allows for the description to be UGC but this only really applies to individual content pages and you can still turning off the meta description on pages that contains a listing not an individual item.

Now to implement the teasers you will have to do a call in your php file (which i think most of you will know this) as something like:

$xoopsTpl->assign('xoops_meta_description'$data['teaser']);


This will alter the smarty variable and allow for the description to be called what the User Generated Content reflects or have some finite data for the search engine to place on that page rather than the default description.
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

Login

Who's Online

432 user(s) are online (326 user(s) are browsing Support Forums)


Members: 0


Guests: 432


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits