Addition of other Modules Lost

bomarmonk - September 1, 2007 - 23:13
Project:Content Templates (Contemplate)
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs work
Description

I am resubmitting this issue for version 5x of the contemplate module (this was already noticed in 4.7 and has still not been officially addressed-- although there is a patch-- can the maintainer please review this patch, update it to 5x, and make it official).

What happens:
The contemplate works great with a standard page that is not including links or content added by other modules. However, if the book module needs to add book navigation, the organic groups module needs to add group content, premium needs to modify how the body or teaser is viewed, nodevote needs to add voting results, location needs to add location links (like "add another location," very important), then contemplate causes big headaches. All of these additions get lost when using contemplate... Simply adding a reference to node links doesn't get the module additions back into the template.

The sad thing is that there appears to be a working patch for 4.7 that should get added and then updated for 5.2. My problem is that I'm now running 5.2 and I was not successful in updating the patch on my own. Please see the patch here and help get this change working with contemplate and the content module: http://drupal.org/node/93935

#1

bomarmonk - September 1, 2007 - 23:14
Status:active» needs work

#2

jjeff - January 12, 2008 - 14:37
Status:needs work» postponed

No patch is attached...

Please attach patch and mark for review.

#3

bomarmonk - January 12, 2008 - 17:31
Status:postponed» needs review

Keep in mind, that this patch no longer works with 5x. But it seems small enough...

AttachmentSize
content.module.patch.txt 433 bytes

#4

Christefano - January 17, 2008 - 18:43
Status:needs review» postponed (maintainer needs more info)

bomarmonk, that patch is for CCK. Can you attach the patch for Contemplate?

#5

bomarmonk - January 18, 2008 - 01:47

Ah, sorry about that... this one should be the contemplate patch. See the original thread for the contributor.

AttachmentSize
contemplate.module.patch_0.txt 1.14 KB

#6

Christefano - January 18, 2008 - 05:15
Status:postponed (maintainer needs more info)» needs review

#7

bomarmonk - April 4, 2008 - 04:34

I am still keeping an eye on these patches. The addition of this functionality would really make contemplate an easier solution for theming nodes. As it is, you have to dig around and try to find every line of code to add another module's links and other additions. +1 for adding this into the mix.

#8

christefano - April 4, 2008 - 16:15

Has anyone reviewed this? I haven't yet but it does sound quite useful.

#9

jrglasgow - April 4, 2008 - 17:02
Status:needs review» needs work

this patch does not work

+      if (!content_types($node->type) && $template = contemplate_get_template($node->type)){

this line will not work, I cannot find a function content_types you cold use
<?php
node_get_types
()
?>
to get a list of the types, but all node types would be listed, even those made with CCK

#10

bomarmonk - April 4, 2008 - 22:48

These patches were originally for the 4.7 version and did work for that version. Jjeff asked for them to be reposted here.

#11

lovedrupal6 - July 19, 2009 - 11:59

the solution for the book navigation menu as i got from http://drupal.org/node/265728:

replace your contemplate template code with this:

<?php
ob_start
(); ?>



// ... PASTE YOUR TEMPLATE HERE......


<?php
$node
->content['body']['#value'] = ob_get_contents();
ob_end_clean();

// iterate through each child elements
foreach (element_children($node->content) as $key) {
 
// we skip child elements which name preceeded by 'field_'
 
if (substr($key, 0, 6) == 'field_') continue;
 
// print child element
 
print $node->content[$key]['#value'];
}
?>

#12

plan9 - September 12, 2009 - 11:54

Is this resolved? I was keen to try out contemplate but if it's going to ignore all of my contributed modules output and rely on code tweaks for each one it seems like more trouble than it's worth.

#13

bomarmonk - September 12, 2009 - 16:33

This has never really been resolved, unless it was fixed in a very recent update. There is code you can plug in to the template to make the links display (such as the navigation links for books). It's not too tricky, but you would think a check box for including links would be even better.

 
 

Drupal is a registered trademark of Dries Buytaert.