Skip to content

Instantly share code, notes, and snippets.

@davekuhar
Last active October 22, 2016 02:49
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 davekuhar/648266b99953828c252778581ce3e7cc to your computer and use it in GitHub Desktop.
Save davekuhar/648266b99953828c252778581ce3e7cc to your computer and use it in GitHub Desktop.
Use Toolset Views and Bootstrap's built-in modal to display content
// this part displays the trigger for the modal
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".xmit-modal-sm-[wpv-post-id]">
<a href="[wpv-post-url]" class="btn btn-info" data-toggle="modal" data-target="#[wpv-post-id]"><div class="imageclass"><img src="[wpv-post-featured-image output="url" size="medium"]" /></div><h4>[wpv-post-title]</h4></a>
</button>
// this is what appears in the modal
<div class="modal fade xmit-modal-sm-[wpv-post-id]" tabindex="-1" role="dialog" aria-labelledby="[wpv-post-title]" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
// can be any HTML content
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment