1 (edited by qubertman 2008-04-04 00:41)

Topic: Description Meta Tag

We want to have a custom description meta tag for the index page. In header.php, it doesn't appear that this can't be easily done since the description meta tag and title tag utilize the generate_crumbs function. Is there a workaround? Thanks.

Re: Description Meta Tag

Actually, that would be where hd_head comes in handy. Some code like this:

$tpl_temp = trim(ob_get_contents());
$tpl_temp = str_replace('<meta name="description" content="'.generate_crumbs(true).'" />'."\n", '<meta name="description" content="I like pie" />'."\n", $tpl_temp);
ob_start();
echo $tpl_temp;

would replace the meta tag with your new tag.

However, header.php could probably use some more arrays rather than echoing content out right away, which would allow you to make the change without messing with output buffering.