Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Created September 29, 2014 15:05
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 salsalabs/4fdfc9076d2b1789b2d6 to your computer and use it in GitHub Desktop.
Save salsalabs/4fdfc9076d2b1789b2d6 to your computer and use it in GitHub Desktop.
Initial SalsaScript for having more than one OG tag in a Salsa template.
<?
//OpenGraph tags for more than one page.
//See https://help.salsalabs.com/entries/21541275-Managing-OpenGraph-meta-tags
var actionKey = Request.getParameter('action_KEY');
if (actionKey != null) {
switch(actionKey) {
// insert your action OG meta <tag> 'case' statements here.
default:
break;
}
}
var donatePageKey = Request.getParameter('donate_page_KEY');
if (donatePageKey != null) {
switch(donatePageKey) {
// insert your donation OG meta <tag> 'case' statements here.
default:
break;
}
}
var eventKey = Request.getParameter('event_KEY');
if (eventKey != null) {
switch(eventKey) {
// insert your event OG meta <tag> 'case' statements here.
default:
break;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment