Please turn JavaScript on
Drupal icon

Drupal

Want to keep yourself up to date with the latest news from Drupal?

Subscribe using the "Follow" button below and we provide you with customized updates, via topic or tag, that get delivered to your email address, your smartphone or on your dedicated news page on follow.it.

You can unsubscribe at any time painlessly.

Title of Drupal: "Drupal Answers"

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  23 / day

Message History

I have this code in my module.

$node = new stdClass(); $node->title = "YOUR TITLE"; $node->type = "page"; node_object_prepare($node); $node->language = 'it'; $node->uid = 1; $node->status = 1; $node->promote = 0; $node->comment = 1; $node = node_submit($node); node_save($node); return "Nodo 222: " . $node->nid;

When I execute ...


Read full story

I have a field I have translated. But I can not figure out how to get that translated field label programmatically. I've found a few posts on here, but none of them work for me.

Pretty easy to get the default field label:

$fieldDefinition = $model->get($field)->getFieldDefinition(); $fieldLabel = $fieldDefinition->getLabel();

Does anyone know a way to ...


Read full story

Here, I tried many different ways to show status messages in pop window but was not able to get success in any way. So, basically i want to show all the status message of site in modal box whether it is configuration message or submit on site of form. Please give suggestion for this if any. Thank you


Read full story

I'm implementing a Views Nivo Slider on a Drupal site. It's currently taking the title field for the caption and using the whole text as a link. How can I configure it to use the body field for the caption so I can just have specific words for links instead of the entire fiel...


Read full story

According to the Services API in Drupal 7, we can use hook_services_request_postprocess_alter() to alter drupal's REST response before returning it to the user. This is useful if you want to alter the structure of an array, or strip out data we don't want returned to the API user. However, I don't see any way to identify what resource is being requested explicitly.

Th...


Read full story