Results 1 to 4 of 4

Thread: Need instructions for how to insert a YouTube video into an article

  1. #1
    New user
    Join Date
    05-08-15.
    Posts
    2

    Default Need instructions for how to insert a YouTube video into an article

    I can't figure out what the code is to insert (embed) a youtube video into an article - can someone help me?

    Thanks!

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Simply use the video ID as you can see in the only demo http://demo.contao.org/contao/main.p...ct=edit&id=289 e.g.
    https://www.youtube.com/watch?v=rOGhp63Lvbo
    ID = rOGhp63Lvbo
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    New user
    Join Date
    05-08-15.
    Posts
    2

    Default

    Thanks for this reply.

    In the demo, it appears that I should be able to create a YouTube video element, but this is not on my list of options to choose from.

    It also says at the top of the demo screen:
    The j_mediaelement template needs to be included in the page layout.

    And I don't think that is the case, and I don't know how to add that.

    I need to be able to embed a YouTube into a Catalog item, rather than an article. Although knowing how to do both would be helpful. It there a different process for adding a YouTube Video Element to a Catalog?

    Thanks for the help.

  4. #4
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    Mediaelement is a jQuery plugin for youtube videos. In your page layout activate jQuery, then you will see j_xxx templates. Choose j_medialelement.

    Don't know Catalog, there was an extension in earlier years, new extension is metamodels.

    I can not give you a manual how to do it, but check the requirements on the Contao demo page what you need for this youtube player.
    • jQuery loaded
    • jQuery mediaelement class loaded
    • initialize the player
    • the right HTML markup so that mediaelement knows where to place the player
    • check the HTML in the demo with JS disabled and then with JS enabled
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •