Skip to content

Instantly share code, notes, and snippets.

@hampelm
Created November 5, 2015 22:10
Show Gist options
  • Save hampelm/6771df6414b747bfb1cf to your computer and use it in GitHub Desktop.
Save hampelm/6771df6414b747bfb1cf to your computer and use it in GitHub Desktop.
<?php
/**
* @file
* Default simple view template to all the fields as a row.
*
* - $view: The view in use.
* - $fields: an array of $field objects. Each one contains:
* - $field->content: The output of the field.
* - $field->raw: The raw data for the field, if it exists. This is NOT output safe.
* - $field->class: The safe class id to use.
* - $field->handler: The Views field handler object controlling this field. Do not use
* var_export to dump this object, as it can't handle the recursion.
* - $field->inline: Whether or not the field should be inline.
* - $field->inline_html: either div or span based on the above flag.
* - $field->wrapper_prefix: A complete wrapper containing the inline_html to use.
* - $field->wrapper_suffix: The closing tag for the wrapper.
* - $field->separator: an optional separator that may appear before a field.
* - $field->label: The wrap label text to use.
* - $field->label_html: The full HTML of the label to use including
* configured element type.
* - $row: The raw result object from the query, with all data it fetched.
*
* @ingroup views_templates
*
* file_create_url
*/
?>
<!--
<?php print_r(array_keys($fields)); ?>
<pre><?php print_r($fields['field_category_']->content); ?></pre>
-->
<div class="carousel-container" style="overflow: auto; background: transparent url(<?php print($fields['field_image']->content) ?>) no-repeat center center;">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="carousel-factoid <?php print_r($fields['field_category_']->content); ?>">
<h2 class="factoid-highlight"><?php print($fields['field_highlight']->content) ?></h2>
<p class="factoid-blurb"><?php print($fields['field_blurb']->content) ?></p>
<a class="more-link" href="<?php print($fields['path']->content) ?>"><?php print($fields['title']->content) ?></a>
</div>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment