123
123

Reputation: 119

add meta keywords to category list html page output

is it somehow possible to echo the category metakeywords on the category list view below the produkt list?

I tried somethink like this in the file template/catalog/catalog/product/list.phtml:

<?php echo $_category->getMetaKeywords(); ?>

but it doesn't output anything. thank you

Upvotes: 0

Views: 788

Answers (1)

Tim Bezhashvyly
Tim Bezhashvyly

Reputation: 9100

You don't get any output because $_category variable is not initialized in template/catalog/catalog/product/list.phtml. The following code shall work:

<?php

$_category = Mage::registry('current_category');
echo $_category->getMetaKeywords();

?>

Upvotes: 2

Related Questions