I recently started working in collaboration with another drupal website, and we are trying to figure out how to get some of their content embedded into my site. They sent my some embed code for a widget, which is below (with some pieces changed for privacy:
<script type="text/javascript">
widgetContext = { "url": "http://theirsite.com/mysite/[nid]", "width": "600", "height": 200, "widgetid": "web_widget_iframe_hash" };
</script>
<script id="web_widget_iframe_hash" src="http://theirsite.com/sites/all/modules/web_widgets/iframe/web_widgets_iframe.js">
</script>
The problem is that I cannot figure out how to get this embedded into my site. The widget generates calendars for venues, so the content is going to change based on which node is being viewed on my site. So, in my nodes, I added a field that stores the NID of the corresponding node on the other site so that the correct calendar is generated.
I'm trying to create a view, in order to dynamically call the above script for each page on my site. The view uses a token to take the NID field and place it into the first part of the script. However, when I place this code into a Custom Field, views strips the script tags and displays the rest of it as text. When I try to place it into a PHP field, it doesn't display at all.
Does anybody have a suggestion for how I can use the above code on my site? I'm at a bit of a loss.