I am using the latest version. I tried to dsm the $title variable in page.tpl.php but it is empty in taxonomy term page and in the product display page

Does anyone else facing this problem??

Thanks

Comments

jajouka’s picture

yes, I am having the same issue regardless of which theme I use but the problem is in the node.tpl.php page.

odizle’s picture

Hi, did you manage to get this working? I am having the same issue, Views pages dose not show the title no matter what theme.

dianikol’s picture

They way i did it is in template.php using preprocess hook and drupal_get_title() to save in a $title variable the current title

jsacksick’s picture

We're overriding it in multiple places, I'm not sure what to do with that issue, we've decided to hide the title in some of the pages. We probably should add a Kickstart settings form somewhere and hide these kinds of overrides.

dianikol’s picture

I think in the template.php and using drupal_get_title() you'll get the last override before print it. Is is what you need? I mean the end result of the title. Maybe an extra field will do the job!

dianikol’s picture

lsolesen’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Seems that @jsacksick answers the question. Please reopen if you disagree.

sagacity’s picture

For me it was still not working, even with configuration (Commerce Kickstart 7.x-2.22). For me this helped (in template.php or as own module):

<?php
function your_module_process_page(&$variables) {
    // check if we have taxonomy and term and numeric positive id
    if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2)) && arg(2) > 0) {
        // set $title
        $variables['title'] = drupal_set_title();
    }
}
?>
armyofda12mnkeys’s picture

Above didnt work for me... I'm having a related issue with a pretty recent build: 7.x-2.39
I dont see the title for Blog Posts under Commerce Kickstart.
Blog Post content type uses title_field machine_name (i guess this might be from Title module making titles translatable)...
To show this, under the file commerce_kickstart_blog.info, i see the title field defined like so:
features_exclude[field_base][title_field] = title_field

but in the commerce-kickstart blog template 'node-blog_post.tpl.php', it uses $title which is always blank.
I guess I could replace $title with $title_field['und'][0]['safe_value'] in the template but that feels wrong to me (a deep field in an 'und' array).
I'm assume maybe $title should be overriden by Drupal Commerce to pull the translated $title_field?

EDIT: For now, i'm manually putting $title = $node->title; in my blog template (which although cleaner than $title = $title_field['und'][0]['safe_value'];, also feels wrong). Whats the solution?