Skip to content

Instantly share code, notes, and snippets.

@davidlfox
Created September 30, 2015 22:41
Show Gist options
  • Save davidlfox/cad6c491f2d8b139f2bb to your computer and use it in GitHub Desktop.
Save davidlfox/cad6c491f2d8b139f2bb to your computer and use it in GitHub Desktop.
array(1) { ["node"]=> array(3) { [57]=> object(stdClass)#72 (3) { ["nid"]=> string(2) "57" ["vid"]=> string(2) "57" ["type"]=> string(14) "carousel_image" } [18]=> object(stdClass)#103 (3) { ["nid"]=> string(2) "18" ["vid"]=> string(2) "18" ["type"]=> string(14) "carousel_image" } [70]=> object(stdClass)#105 (3) { ["nid"]=> string(2) "70" ["vid"]=> string(2) "70" ["type"]=> string(14) "carousel_image" } } } 1
<?php
// $nodes = node_load_multiple(array(), array('type' => 'carousel_image'));
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->propertyCondition('status', 1)
->propertyCondition('type', 'carousel_image')
->fieldOrderBy('field_weight', 'value', 'ASC')
->range(0,100);
$nodes = $query->execute();
echo print var_dump($nodes);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment