Article title on the frontpage are not displayed :(

+1
0
-1

Hello,

Using Tb methys, all my articles are displayed on the Main content region of the frontpage. But I am facing a strange issue: the title of my articles are not displayed. You can see this on http://www.glutenaway.be/

So I've checked the view (that is displaying content - teaser) and I can see the title in the preview.
So I've checked the CSS but I do not have the field node.title appearing. And no display: none on my custom css.

I suppose that the problem is in the page.tpl but I am not so good to touch this without support.

Here is a copy of my page.tpl. Please note that I've removed the content type title so that node title is the h1. Thank you beforehand !!!!!

<?php

<?php if($headline = render($page['headline'])): ?>

">
<?php print $headline; ?>

<?php endif;?>

">

<?php if ($logo): ?>
" title="<?php print t('Home'); ?>" id="logo"> " alt="<?php print t('Home'); ?>" />
<?php endif; ?>
<?php if ($site_name || $site_slogan): ?>

<?php if ($site_name): ?>
" title="<?php print t('Home'); ?>"> <?php print $site_name; ?>
<?php endif; ?>
<?php if ($site_slogan): ?>
<?php print $site_slogan; ?>
<?php endif; ?>

<?php endif; ?>

<?php if ($header = render($page['header'])): print $header; endif; ?>
<?php if($menu_bar = render($page['menu_bar'])): ?>
<?php if ($secondary_menu): ?>
<?php print theme('links__system_secondary_menu', array(
'links' => $secondary_menu,
'attributes' => array(
'id' => 'secondary-menu-links',
'class' => array('links', 'inline', 'clearfix'),
),
'heading' => array(
'text' => t('Secondary menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
)); ?>

<?php endif; ?>

<?php print $menu_bar; ?>

<?php endif;?>

<?php if($slideshow = render($page['slideshow'])): ?>

">
<?php print $slideshow; ?>

<?php endif;?>
<?php if($messages || $page['help']): ?>

">
<?php print $messages . render($page['help']); ?>

<?php endif; ?>

clearfix">
">
<?php if ($mass_top = render($page['mass_top'])): ?>

<?php print($mass_top);?>

<?php endif; ?>
">
<?php if ($content_width) :?>

section">

<?php if ($tabs = render($tabs)): ?>
<?php print $tabs; ?>
<?php endif; ?>
<?php if ($highlighted = render($page['highlighted'])): print $highlighted; endif; ?>
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<?php print $title; ?>
<?php endif; ?>
<?php print render($title_suffix); ?>
<?php if ($action_links = render($action_links)): ?>

<?php endif; ?>
<?php if ($content = render($page['content'])): print $content; endif; ?>
<?php //print $feed_icons; ?>

<?php endif;?>
<?php if (($sidebar_first = render($page['sidebar_first'])) && $sidebar_first_width) : ?>

grid-last">
<?php print $sidebar_first; ?>

<?php endif; ?>

<?php if (($sidebar_second = render($page['sidebar_second'])) && $sidebar_second_width) : ?>

grid-last">
<?php print $sidebar_second; ?>

<?php endif; ?>

<?php if($panel_bottom): ?>

clearfix"> <?php print $panel_bottom;?>

<?php endif; ?>
<?php if($breadcrumb): ?>

clearfix"><?php print $breadcrumb; ?>

<?php endif; ?>
<?php if ($footer = render($page['footer'])): ?>

">

<?php print $footer; ?>
<?php if($back_to_top_display): ?>
" class="btn-btt" href="#Top">▲ <?php print t('Top')?>
<?php endif; ?>

<?php endif; ?>

+1
0
-1

Hi willbxl,

The way ,you have removed content type title to make the node title become h1, could affect article title on the frontpage. Following code inside the node.tpl.php should be keep:

<?php if ($title && !$page): ?>
    <div class="header article-header">
      <?php print render($title_prefix); ?>
      <?php if ($title): ?>
        <h2<?php print $title_attributes; ?>>
          <a href="<?php print $node_url; ?>"><?php print $title; ?></a>
        </h2>
      <?php endif; ?>
      <?php print render($title_suffix); ?>
    </div>
  <?php endif; ?>

Revert them if you have remove them

Moreover, to prevent node title duplication, you should remove following code on 16th line inside sites/all/themes/tb_methys/inc/preprocess_functions.inc:

$vars['page'] = ($vars['type'] == 'page') ? true : false;

Kind regards,
Will

+1
0
-1

Hello will,

Thank you very much for your help, it works perfectly!
All the titles are back and I've no issue on the other pages.

Have a nice day!
William.