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 characters
$person = node_load($person_nid); | |
$image = field_get_items('node', $person, 'field_image'); | |
foreach ($image as $key=>$value) { | |
$output = field_view_value('node', $person, 'field_image', $image[$key], array( | |
'type' => 'image', | |
'settings' => array( | |
'image_style' => 'thumbnail', //place your image style here | |
'image_link' => 'content', | |
), |
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 characters
<% if @project_quantity.each do |quantity| %> | |
<%= quantity.quantity %> | |
<% end.empty? %> | |
0 | |
<% end %> |
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 characters
<%= forecast.project_types.collect { |a| a.title } %> | |
# a.title will print forecast.project_types.title |
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 characters
// block_load docs: https://api.drupal.org/api/drupal/modules%21block%21block.module/function/block_load/7 | |
// Get the arguments from the second- and third-to-last segments of a block's configure URL | |
// For instance: /#overlay=admin/structure/block/manage/webform/client-block-150/configure | |
$block = block_load('webform','client-block-150'); | |
print drupal_render(_block_get_renderable_array(_block_render_blocks(array($block)))); |
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 characters
/** | |
* Implements hook_entity_info_alter(). | |
*/ | |
function MYMODULE_entity_info_alter(&$entity_info) { | |
$entity_info['node']['view modes']['another_teaser'] = array( | |
'label' => t('Another teaser'), | |
'custom settings' => TRUE, | |
); | |
} |
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 characters
module ApplicationHelper | |
def current_class?(test_path) | |
return 'active' if request.path == test_path | |
'' | |
end | |
end |
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 characters
<%= link_to 'Delete this junk', junk_path(j), :method => :delete, :confirm => 'You sure you want to delete this junk?' %> |
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 characters
@mixin css-arrow($color:#000, $size:'5px', $direction:'up') | |
width: 0 | |
height: 0 | |
@if $direction == 'up' | |
border-right: $size solid transparent | |
border-left: $size solid transparent | |
border-bottom: $size solid $color | |
@if $direction == 'down' |
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 characters
.videoWrapper { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 25px; | |
height: 0; | |
} | |
.videoWrapper iframe { | |
position: absolute; | |
top: 0; |