Skip to content

Instantly share code, notes, and snippets.

@wvuwebgist
Last active October 4, 2015 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvuwebgist/2580219 to your computer and use it in GitHub Desktop.
Save wvuwebgist/2580219 to your computer and use it in GitHub Desktop.
Flexslider for SlateCMS, v2
<!-- Stylesheet for flexslider -->
<link rel="stylesheet" href="/themes/shared/flexslider/stylesheets/flexslider.2.1.css" /> <!-- Either reference the shared folder, or you may copy and paste these into your stylesheets. We recommend overriding styles with new rules instead of directly editing the rules in this stylesheet. This allows for easy upgrades later. -->
<!--======================================================
The markup and call for images for Flexslider are determined by _gallery.rhtml
==========================================================-->
<!-- FlexSlider scripts -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/themes/shared/javascripts/jquery-1.10.2.min.js"><\/script>')</script>
<script src="/themes/shared/flexslider/js/jquery.flexslider.2.1.min.js"></script> <!-- being sure to reference the shared folder -->
<script>
$(window).load(function() {
$('.flexslider').flexslider(); // customize this to fit your needs, docs @ http://www.woothemes.com/flexslider/ , examples of customization: http://pastie.org/8640169
});
</script>
{{ Collection.gallery collection_id=5579, template="gallery" }}
comment. Change the collection id to your set id/number in Slate. template="gallery" is required in order to reference your customized _gallery.rhtml file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment