
Originally Posted by
paul3648
Any ideas how I can add meta tags to individual testimonial pages?
I can use the meta_tags.php file for
case 'testimonials_manager'
...but not
case 'testimonials_manager&testimonials_id=43'
Better yet, it would be great if meta tags could be generated automatically from the content of the comment. Nice dream...
Open includes/modules/meta_tags.php
add the following code just above the // EZ-Pages: section:
Code:
//TESTIMONIALS:
case 'testimonials_manager_all_testimonials':
$sql = "select * from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = '" . (int)$_SESSION['languages_id'] . "' order by date_added DESC, testimonials_title";
$testimonials = $db->Execute($sql);
$testimonial_title = 'All Testimonials - ';
while (!$testimonials->EOF) {
$testimonial_string_metatags .= zen_clean_html($testimonials->fields['testimonials_title']) . METATAGS_DIVIDER;
$testimonials->MoveNext();
} //EOF
define('META_TAG_TITLE', $testimonial_title . $testimonial_string_metatags);
define('META_TAG_DESCRIPTION', $testimonial_title . $testimonial_string_metatags);
define('META_TAG_KEYWORDS', $testimonial_title . $testimonial_string_metatags);
break;
case 'testimonials_manager':
$testimonial_title = 'Testimonial - ';
define('META_TAG_TITLE', $testimonial_title . $page_check->fields['testimonials_title']);
define('META_TAG_DESCRIPTION', $testimonial_title . $page_check->fields['testimonials_title']);
define('META_TAG_KEYWORDS', $testimonial_title . $page_check->fields['testimonials_title']);
break;