Drupal - CCK email field from PHP
Q: How do I access a node's CKK email field from PHP, I tried $node->my_email_field[0]['value'] and it didn't work?!
Q: A lot of fields can be accessed via ['value'] but not the CCK emailfield, instead use:
$node->my_email_field[0]['email']I keep forgetting this and have to switch on devel module and use dvm() to check the field makeup which is a pain - so I am writing it down now!
- Kevin's blog
- 1902 reads
- Comments
Drupal, Remove 'Submitted by' Text
Submitted by Kevin on Fri, 26/06/2009 - 18:27
Q: How can I remove the 'Submitted by' text that is always displayed with my CCK type?
A: Go into the Administer, Themes screen, click on the 'Configure' tab (/admin/build/themes/settings) and then un-check the 'Display post information on' checkbox for your Node type.
This post once again deals with how to re-configure some of drupal's default behaviour so that your website more closely matches your target web design.
- Kevin's blog
- Add new comment
- Read more
- 1126 reads
- Comments
Drupal - Display Fivestar on CCK Node with content template
Q: How do I get the fivestar widget to display on CCK nodes when using a content template to format the CCK type, I have enabled it for my type but the fivestars widget does not show up at all?
A: If you're using a content template to display your CCK node you have to explicitly add code to display the fivestar widget by outputting the contents of: $node->content['fivestar_widget']['#value'];
- Kevin's blog
- 5 comments
- Read more
- 1280 reads
- Comments
Drupal - Remove 'Revision Information'
Submitted by Kevin on Fri, 17/04/2009 - 20:42
in
Q: How can I get rid of that pesky but persistent 'Revision Information' settings section from the create & edit content forms in Drupal 6?
A: You just need to hook into the phptemplate_node_form() function and disable the field - just a bit of PHP required!
- Kevin's blog
- 7 comments
- Read more
- 2466 reads
- Comments
Drupal 6 - Specify URL for CCK Type
Q: How can I arrange for the content type that I created with the CCK to follow a specific path/URL pattern?
A: Specify the Path template in the following settings section - Administer/URL aliases/Automated alias settings/Node path settings
- Kevin's blog
- 6 comments
- Read more
- 1353 reads
- Comments









