Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo3 variable does not contain the source to my video I want to embed in my page #54

Open
OAhlke1 opened this issue Sep 4, 2024 · 2 comments

Comments

@OAhlke1
Copy link

OAhlke1 commented Sep 4, 2024

Hello Mr. Lochmueller,

I want to embed a video via a Typo3 script (which you will find below) so that the URL of the video is stored in a variable which is set as value for the src-attribute of the video-tag.
The problem I am facing is now, that the variable is always empty, no matter what I do.
I am using a Text&Media-field and my Typo3-Version is 13.2.1

Here is the script that ChatGPT generated for me:

page = PAGE

page {

  meta.author = BOK&Gaertner

  meta.description = Station5

  meta.viewport = width=device-width, initial-scale=1

  lib.rteText = CONTENT

  lib.rteText {

    table = tt_content

    select {

      pidInList = 9   # Die PID der Seite, auf der sich das Inhaltselement befindet

      colPos = 1      # Die Spalte, in der sich das Inhaltselement befindet

      uidInList = 39  # Die UID des Inhaltselements

    }

    renderObj = TEXT

    renderObj {

      field = bodytext  # Das Feld, das den RTE-Inhalt enthält

      parseFunc = < lib.parseFunc_RTE

      stripHtml = 1    # Entfernt HTML-Tags aus dem Text

    }

  }
 
  10 = FLUIDTEMPLATE

  10 {

    templateName = "Station5"

    layoutRootPaths.0 = EXT:site_package/Resources/Private/Layouts/

    partialRootPaths.0 = EXT:site_package/Resources/Private/Partials/

    templateRootPaths.0 = EXT:site_package/Resources/Private/Templates/
 
    variables {

      rteText < lib.rteText

      rteText.insertData = 1

    }

  }
 
  includeCSS {

    css = EXT:site_package/Resources/Public/Css/styles.css

    css1 = EXT:site_package/Resources/Public/Css/station5styles.css

  }

}

I really hope for your answer!

OAhlke1

@lochmueller
Copy link
Owner

Hey @OAhlke1
"my Typo3-Version is 13.2.1" -> The extension is for TYPO3 v11 max. Do you upgrade from a old version or why you want to handle EXT:html5videoplayer stuff in TYPO3 v13?
Regards,
Tim

@OAhlke1
Copy link
Author

OAhlke1 commented Sep 5, 2024

Hi @lochmueller
Well its because I am aware to the typical way of embedding a video to the video-tag via the src-attribute to be honest.
I would be thankful for every help: which way would you to embed a video?
And I started from scratch with version 13.2.1 :-)

Oh, and here is the HTML-snippet I ment:

<f:debug>{video}</f:debug>
<video controls>
  <source src="{video}" type="video/mp4">
  Your browser does not support the video tag.
</video>

But the debugger says, that video does not contain anything.

Thanks again for your reply :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants