This file contains 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
<% 10.times { -%> | |
<%= render :partial => '/prototype/partials/story-list/story_list_filler' %> | |
<% } -%> |
This file contains 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
<?php | |
$front_page = node_load("111"); | |
$page_intro = field_view_field('node',$front_page,'field_page_intro'); | |
print render($page_intro); | |
?> |
This file contains 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
<?php | |
$front_page = node_load("1"); | |
foreach ($front_page->field_slideshow_images['und'] as $key => $value) { | |
$slide = entity_load('field_collection_item', array($value['value'])); | |
$idx = $value['value']; | |
?> | |
<div class="rsContent slide"> | |
<img src="<?php print image_style_url('none', $slide[$idx]->field_image['und']['0']['uri']); ?>" class="rsImg"> | |
<div class="projectInfo"> | |
<p><?php print $slide[$idx]->field_title_of_project['und']['0']['value']; ?></p> |
This file contains 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
/*-------------------------------------------------------------------------------*/ | |
/* GLOBAL / DRUPAL OVERRIDES */ | |
/*-------------------------------------------------------------------------------*/ | |
html { | |
background: #fff; | |
} | |
body { | |
background: #fff; | |
color: #111011; |
This file contains 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 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 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 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 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?' %> |