Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have created CCK fields and want to use the value of one CCK field to display/override the default head title.
I have used following method but output is blank.
function mytheme_preprocess_page(&$vars) {
$meta_description = $node->field_meta_description[0]['view'];
if (!empty($meta_description)) {
$vars['head_title'] = $meta_description;
}
}
Regards,
Anup S
I am newbie in this drupal. Can somebody help me to fix this problem.
Comments
Comment #1
thekevinday CreditAttribution: thekevinday commentedI am moving this issue to the appropriate project.
Comment #2
anup007np CreditAttribution: anup007np commentedThat would be grt.