ProsePoint Express: hosted newspaper website content management software

How to remove channel title from "listing stories by channel"?

2 replies [Last post]
oleg
oleg's picture
User offline. Last seen 2 years 1 week ago. Offline
Joined: 28/03/2009
Posts:

I want to hide big title on top of teasers list that displays title if channel.

 

beng
User offline. Last seen 1 week 3 days ago. Offline
Joined: 27/02/2009
Posts:
Here is one way to do it.

Hi,

Here is one way to do it.

From your screenshot, it looks like you're using the sample subtheme tma_custom. This is good. In the tma_custom subdirectory, create a file template.php with the following paragraph of code:

<?php

function tma_custom_preprocess_page(&$vars, $hook) {
  if (arg(0) == 'channel' && arg(2) == 'stories') {
    $vars['title'] = '';
  }
}

Then clear your site's caches and see if it works.

This function tests whether the first part of the path is 'channel' and whether the third part is 'stories'. If so, it then blanks out the title ie. $var['title'].

You may want to fiddle around with the conditions to suit yourself.

For further information, please see the Drupal themeing guide at http://drupal.org/theme-guide/6.

oleg
oleg's picture
User offline. Last seen 2 years 1 week ago. Offline
Joined: 28/03/2009
Posts:
thank you, Beng, it works!