Hi

In the full node view is it possible to change the order in which the information for the announcement is displayed. Ideally I would like to move the date and abstract to a different block (page_title) so that it appears below the title and then the main contents section displays the full appointment body.

Any clue as to how this can be achieved would be appreciated.

Cheers

Cust.

Comments

nancydru’s picture

Status: Active » Fixed

Have you tried adding a "node-announcements.tpl.php" to your theme? You can customize the look all you want.

Custheyder’s picture

Status: Fixed » Active

Thanks for getting back to me. I really appreciate it.

I've tried "node-announcements.tpl.php" and "page-announcements.tpl.php" they both allow me to make changes to the layout, but it's when I click the announcement title and it moves me onto the full page view of the announcement I can't format it the way I would like. Does that make any sense? .... or am I missing something basic. (highly likely!)

nancydru’s picture

Title: Moving Abstract » Theming announcements

I will admit that I could improve the theming capabilities in this module.

Right now, I would have to go see what happens when you request full node vs teaser, but it shouldn't be that different.

Custheyder’s picture

Status: Active » Closed (fixed)

Sorted it with a bit of hacking between the announcements.module and the page.tpl. I've also learnt a lot more about Drupal in the process. Thank you for your patience.

nancydru’s picture

That's how I learned much of what I know. BTW, would you care to share your solution?

Custheyder’s picture

Are you sure? ... it's really clunky!

in the page_tpl I added the following into the block I wanted then to display:

if (!empty($node)):

		          print theme_announcements_dates($node);
		          print theme_announcements_abstract($node);
		        

endif;

Fortunately I don't have any other modules that have nodes to worry about. Otherwise I'd have to check what sort of node it is.

In the announcements_module in the function announcements_view I removed the "else" which was displaying the date and abstract and collapsed everything else into the teaser. Now is reads:

function announcements_view($node, $teaser = FALSE, $page = FALSE) {
$node = node_prepare($node, $teaser);
if ($teaser) {
$node->content['dates'] = array(
'#value' => theme('announcements_dates', $node),
'#weight' => -4,
);
$node->content['body'] = array(
'#value' => theme('announcements_abstract', $node),
'#weight' => -2,
);
}
return $node;
}

I did say it was pretty clunky.

Oh ... should also say you can see the results at www.iom-poetry.org ...when they approve the content and allow me to open it up.

nancydru’s picture

Thanks. I'll look at it,