Tagged Questions
3
votes
1answer
51 views
Where to place PHP code for a node if not in the node body block itself?
Up until now, I have found it most convenient and easy to place PHP code into my node by placing it in the node body and enabling the PHP filter. However, I have been informed that this is incorrect ...
1
vote
2answers
68 views
Block rendering
Today I found a working php snippet to load block content into a node:
<?php
$block = block_load('block', '1');
$output = ...
1
vote
1answer
59 views
Saving default field values on node_insert
I would like to automatically save a CCK field which will be determined by the data in the $node object. Using node_save in this instance will cause an error so I need a way to simply insert the ...
0
votes
2answers
344 views
Display images instead of nodes titles in Drupal 7
Normaly in Drupal 7 we have (node.tpl.php):
<?php print render($title_prefix); ?>
<?php if (!$page): ?>
<h2<?php print $title_attributes; ?>><a href="<?php print ...
0
votes
2answers
64 views
How can I get a block to display only on node view in Drupal 6
I have a block that I need displayed only on the main page of a node.
I can get it to display on node/1/view by putting node/*/view in the conditions, but that only works if view is in the URL. I ...
0
votes
2answers
75 views
References by title (not nid) while creating nodes via PHP code
does anyone know how to create node reference while creating node programmatically? I mean - using TITLE and TYPE, not nid.
I am creating nodes via python script and user is prompted for title of ...