I'm trying out Views, I have managed to get it selecting what I want and the data comes up when I navigate to the path I entered, but am confused how I set the meta title or meta description for this, is there a module or do I have to use PHP or have I simply missed some setting in the Views admin?

Thanks for any help.

(or am i supposed to somehow embed views in a node?)

Comments

Matt Walker’s picture

You'll need to create a custom page template for your views page, and hardcode the meta tags in there. This will also work if you want the page title to be more SEO-friendly than the title of the view.

Go to sites/all/themes/(your theme) and find page.tpl.php. Make a copy of this file, but rename it with the Drupal URL of the page view.

Example: My page view was at content/projects. So I renamed the file page-content-projects.tpl.php.

Then you can open up your new page template file in your code editor and drop in those meta tags in the head.

This isn't the greatest solution, because if you ever switch or alter your theme, you'll have to fix up your custom template as well, but it will get the job done.