I'd like to modify the way the story nodes display. Is this something I should do in the module creating an _page function, or can it be done in the theme?

For maintenance reasons, I think my preference would be to modify the theme. Here's what I'd like to do.

Currently, story.module displays the following:
   Node Title
   author : Submit Date
   body
   node links : node links : node links...

I'd like to hide the second line, so that it looks like this:
   Node Title
   body
   node links : node links : node links...

As always, any guidance or tips would be greatly appreciated.

Cheers,
- Joe

Comments

joe lombardo’s picture

I should have shared this in the original post. I'm using the interlaced theme and it looks like I could put a condition in the node() function around the following line:

print "<div class=\"nodebody\"><span class=\"nodedate\">".$this->links(array(format_name($node),format_date($node->created, "small")," <br>"))."</span>";

The question remains though, is this an acceptable approach?
- joe

Joe Lombardo | joe@familytimes.com | My Blog

torgeirb@drupal.org’s picture

That's what I would do anyway. I assume you're thinking something like:

if (node is not a story) {
print "Author and so on"
}

james.varga’s picture

Could you put that in dunce speak as its exactly what I would like for a site I'm setting up now - I need this to go into the xtemplate theme.

Stefan Nagtegaal’s picture

function yourtheme_node($node, etc) {
  switch($node->type){
    case "story":
    $output .= "The way you want your story to appear";
    break;
    case "book":
    $output .= "The way you want your book to appear";
    break;
    case "page":
    $output .= "The way you want your pages to appear";
    break;
    case "blog":
    $output .= "The way you want your blogs to appear";
    break;
    case "event":
    case "image":
    $output .= "The way you want your image and events to appear";
    break;
  }
}

I think you understand better this way...

chkashif167’s picture

please can somone tell me how can i remove author name and posted data from below site

http://www.darmanin.com.pk/

Thank

Kashif

tryitonce’s picture

I looked at the site and couldn't see the problem.

Did you solve it?

Just post the answer here - surely others looking to solve the same problem will appreciate it.

If not solved - post a URL that shows the problem - thanks and good luck

Schmidt Attila’s picture

Hi,

never modify the php code in the core modules. The next upgrade is can be strange...

The better way, if you modify the style.css file in the used theme/smink directory. If you build a drupal site, than yo will have an own garland style...

For example put these lines for hide the node authors (and so on) informations in search result:
.search-info {
display: none;
}

If you do not know what is the exact css class name, just open the source code of the page in the browser.