0

I'm trying to create an embedded soundcloud field in my drupal site but the embed is coming out too LARGE. In Soundcloud you can make the embed code reflect a smaller value in the sharing options, but there's no way to save it.

I can't find a way to actually use embed code in drupal. I've added the media module and the embedded media field module and the soundcloud module and the oEmbed module. None of them let me add embed code - they just accept a URL (and in fact they make me put the URL in twice for some reason). But the point is, they don't let me add embed code and I need to be able to add and tweak the embed code itself, not just add by URL.

I looked here and that doesn't help: how to add a cck field for youtube embed code?

Anyone know how to do this?

1

Create a new field on your content type called "Embed code", and create a new text format called "code" where HTML is allowed, and no WYSIWYG modules are enabled.

Use css to change the width and height of the iframe of the soundcloud widget. it will adapt automatically.

More control Using Views:

  1. Hide that field from display on the "manage display" tab of your content type.

  2. Create a view block display.

  3. In that view, bring in the embed code field.

  4. Add a contextual filter to the view. Use the nid and provide a default value "content ID from URL".

  5. Place the block on your page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.