How can we control the meta descriptions of individual pages?
We have a custom local interface, and each "page" has an HTML file and a PHP file. The entire head tag though seems to be in StdPageStart.
Is there a plugin perhaps to control HTML meta tags with? Or do we need to write one?
There currently isn't a way of specifying
meta
tags for individual pages, but it seems like a very good idea to provide one. We'll look into a generalized solution, but in the mean time it would be really easy to write a plugin that hooksEVENT_IN_HTML_HEADER
, looks at which page you're on (could use$GLOBALS["AF"]->GetPageName()
), and spits out whatever additionalmeta
tags might be desired.What specific use cases do you have in mind? (Just want to make sure we take them into account.)
Thanks Ed.
The use case we have is basically a page focusing on one classification. It has a slider and some hardcoded text at the top, and then a block of resources filtered to that one classification listed at the bottom. Our client just wants a meta description tag in the page, with the content attribute set to some text that is specific to describing the classification/page.
For now I kept it easy (and cheesy, I suppose) by just setting a php text variable to the desired description in the php file for the page, and then outputting the meta tag in StdPageStart if the variable is not empty.