title: Silverstripe | Insert html shortcode - page specific
body: <p>Still on my way to muster Silverstripe 3.4 I am bumping into a challenge that I cannot resolve. </p>
  
  <p>A number of pages on my site must include an audio player that allows visitors to play a self-hosted track that relates specifically to the viewed page. Normally I would embed the following html to the player's engine straight into the page's code but with Silverstripe's WYSIWYG Editor that's not an option, as it rejects the inclusion of 'copied-in' code in html viewing mode. </p>
  
  <p>I have not yet investigated whether it's possible to modify the editor to accept 'copied-in' code; not sure whether that could be an option too...</p>
  
  <p>So, I am now looking for ways to inject code - such as the following - through my WYSIWYG in the appropriate pages:</p>
  
  <pre><code>&lt;!-- Start of audio player body section html codes --&gt;
  &lt;div id="AUDIOPLAYER_ID" style="display:block;position:relative;width:360px;height:auto;margin:0px auto 0px;"&gt;
  &lt;ul class="AUDIOPLAYER_CLASS" style="display:none;"&gt;
  &lt;li data-artist="TRACK_ARTIST" data-title="TRACK_TITLE" data-album="ALBUM_NAME" data-info="TRACK_INFO" data-image="TRACK_IMAGE" data-duration="TRACK_MINS"&gt;
  &lt;div class="TRACKSOURCE" data-src="SELF_HOST_TRACK_URL" data-type="audio/mpeg" /&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;!-- End of body section HTML codes --&gt;
  </code></pre>
  
  <p>Note: For what it's worth, each audioplayer will have its own ID "AUDIOPLAYER_ID" to ensure pages can hold multiple players. </p>
  
  <p>Can anyone share any wisdom on how to achieve this best, either through shortcodes or through a WYSIWYG intervention?</p>
  
  <p>Heaps of thanks in advance!</p>