Closed (fixed)
Project:
Announcements
Version:
6.x-1.2
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2009 at 08:55 UTC
Updated:
10 Mar 2009 at 13:04 UTC
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
Comment #1
nancydruHave you tried adding a "node-announcements.tpl.php" to your theme? You can customize the look all you want.
Comment #2
Custheyder commentedThanks 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!)
Comment #3
nancydruI 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.
Comment #4
Custheyder commentedSorted 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.
Comment #5
nancydruThat's how I learned much of what I know. BTW, would you care to share your solution?
Comment #6
Custheyder commentedAre 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)):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.
Comment #7
nancydruThanks. I'll look at it,