Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Tweeted twitter.com/#!/StackDrupal/status/301726098230738944
added 3 characters in body
Source Link

I have the following function that simply grabs nodes:

function getWords() {
    $query = new EntityFieldQuery();
    $query->entityCondition('entity_type', 'node', '=')
            ->propertyCondition('status', 1, '=')
            ->propertyCondition('type', 'wall_of_words', '=');
    $result = $query->execute();
    return node_load_multiple(array_keys($wow['node']$result['node']));

}

Right now it's working but it's returning everything, is there a way I can return the contents of the body or title field only?

I have the following function that simply grabs nodes:

function getWords() {
    $query = new EntityFieldQuery();
    $query->entityCondition('entity_type', 'node', '=')
            ->propertyCondition('status', 1, '=')
            ->propertyCondition('type', 'wall_of_words', '=');
    $result = $query->execute();
    return node_load_multiple(array_keys($wow['node']));

}

Right now it's working but it's returning everything, is there a way I can return the contents of the body or title field only?

I have the following function that simply grabs nodes:

function getWords() {
    $query = new EntityFieldQuery();
    $query->entityCondition('entity_type', 'node', '=')
            ->propertyCondition('status', 1, '=')
            ->propertyCondition('type', 'wall_of_words', '=');
    $result = $query->execute();
    return node_load_multiple(array_keys($result['node']));

}

Right now it's working but it's returning everything, is there a way I can return the contents of the body or title field only?

Source Link

Returning body values only

I have the following function that simply grabs nodes:

function getWords() {
    $query = new EntityFieldQuery();
    $query->entityCondition('entity_type', 'node', '=')
            ->propertyCondition('status', 1, '=')
            ->propertyCondition('type', 'wall_of_words', '=');
    $result = $query->execute();
    return node_load_multiple(array_keys($wow['node']));

}

Right now it's working but it's returning everything, is there a way I can return the contents of the body or title field only?