Skip to content

Instantly share code, notes, and snippets.

@ivmarkp
Last active June 13, 2017 23:08
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 ivmarkp/faf2f17aee7ac6f12d6cd518bd6e3f3b to your computer and use it in GitHub Desktop.
Save ivmarkp/faf2f17aee7ac6f12d6cd518bd6e3f3b to your computer and use it in GitHub Desktop.
Javascript to be stored as clicklogjs in the templates/inc directory.
<script type="text/javascript"><!--
function clicklog() {
// Redirect to the clicklog template with $id of the clicked document.
// We could do something like:
// window.location.assign("../clicklog")
// to redirect to the clicklog template.
// I'm not sure about how we could pass $query and the clicked doc $id to the template.
return true; // To allow following the href link in the <a> tag i.e. document url.
}
// -->
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment