We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
1
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
1
  • Home
  • Forums

How to get video id from URL field?

How Do I?

shbchk's avatar
shbchk
12 posts
4 years ago
shbchk's avatar shbchk

Hello! Is there a way to get video id from Youtube url (stored in a URL field) without php in template?

       
Rob Allen's avatar
Rob Allen
2,950 posts
4 years ago
Rob Allen's avatar Rob Allen

Lets say you have a URL:

https://youtu.be/fclYmVaORbM

You could use the replace modifier to remove the domain part like this:

{your_url_field:replace find='https://youtu.be/' replace=''}

That should give you a value of “fclYmVaORbM”

👍 1
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.