Forums / Developer / Meta Description tag / Comment40958
manu let
Wednesday 16 January 2008 2:21:11 am
THE FOLLOWING IS WORKING FINE:
Insert custom metatags in the folder's and article class.
Created the custom attributes for meta_description and meta_keys as text field on the folder class...make sure they are not set up as information collector or it will NOT WORK!I have then the following Page_Head.tpl
<meta name="description" content="" /> <meta name="keywords" content="" />
What i am doing wrong? Please help, i have been on this for 10 days now and seriously struggling!!!
{* DO NOT EDIT THIS FILE! Use an override template instead. *} {*?template charset=latin1?*} {default enable_help=true() enable_link=true()} .. snip {let node_metas=fetch(content, node, hash(node_id, $module_result.node_id))} <meta name="description" content="{$node_metas.object.data_map.meta_description.content}" /> <meta name="keywords" content="{$node_metas.object.data_map.meta_keys.content}" /> {/section} {/let} .. snip {/default}
And what is created is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB"> <head> <meta name="description" content="my description" /> <meta name="keywords" content="my keywords" /> <title>Our Team / Home - Website Interface</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-language" content="en-GB" /> <meta name="MSSmartTagsPreventParsing" content="TRUE" /> <meta name="generator" content="NeatNet" />
Bonne chance! Regards,EL