Forum

Thread tagged as: Problem, Field-Types

perch:content in a textarea field

I want a user to be able to place a youtube video in the body of an article, which is currently configured as a textarea field

The youtube field implementation is installed and working.

The video url is stored in a perch content region (and displays correctly as a thumbnail.

Can the user simply insert a line like this where they want the video to appear ?

<perch:content id="video2" type="youtube" label="video" />

If a reference to a perch region can indeed go in a perch region, something is not working.

What am I missing ? Pretty please :-)

Tim Considine

Tim Considine 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If you're using the field type, that needs to go into your template.

If you want to embed it in the middle of some text, the field type won't help you there.

OK, thank you for the clarification.

How would I allow a user to call some content? Or do I just lose the content and teach them about putting in a block of code, e.g. an iframe ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you set html="true" on the textarea, they should be able to paste the YouTube embed code in directly.

Thanks It was set to allow html Maybe there was a problem with the embed. Working now Thank you for your prompt support

Redactor definitely works for this: https://grabaperch.com/add-ons/plug-ins/redactor

Has a specific button for video embed code