Created
August 29, 2014 15:50
-
-
Save slucero/cee51deacb4077a79f8e to your computer and use it in GitHub Desktop.
Revisions
-
slucero revised this gist
Aug 29, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ <?php $query = new EntityFieldQuery(); $entities = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'event') @@ -11,4 +12,5 @@ $build['#nodes'] = $views['nodes']; $build['#theme'] = 'whatever'; return $build; ?> -
slucero created this gist
Aug 29, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ $query = new EntityFieldQuery(); $entities = $query->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'event') ->propertyCondition('status', 1) ->fieldCondition('field_date', 'value', array('2011-03-01', '2011-03-31'), 'BETWEEN') ->fieldOrderBy('field_date', 'value', 'ASC') ->execute(); $nodes = node_load_multiple(array_keys($entities['node'])); $views = node_view_multiple($nodes, 'teaser'); $build['#nodes'] = $views['nodes']; $build['#theme'] = 'whatever'; return $build;