gornycreative Posted April 24 Share Posted April 24 Just curious if this module is still active/stable? It doesn't appear in the modules directory - I only found it through searching the forum. Thanks, J Link to comment Share on other sites More sharing options...
adrian Posted May 8 Author Share Posted May 8 @gornycreative - I haven't used it in quite some time, but I think it should still work. Link to comment Share on other sites More sharing options...
neophron Posted November 2 Share Posted November 2 Struggling with page reference inside repeater Hi, since the video files are usually bigger then some jpgs, I wanted to reuse uploaded video files on a website. There is a page reference field select_video inside a repeater. The file field for the videos is video_field. In a hidden page "video-container" are hidden child pages. Each child pages has a single video. I want to show each video via the page reference (inside a repeater) on a different page. In the field video_field under Basics -> Type the option Files is active. This is my code, where only headline and body_second are rendered. <? foreach ($page->repeater_headline_movie_text as $item) : ?> <h3><?= $item->headline; ?></h3> <article class="video_article"> <?php if ($item->select_video->id) : ?> <?php $file = $item->video_field; if($file) { echo "<video width='{1280}' height='{710}' poster='{$file->video_field->poster}' controls='controls' preload='yes'> <source type='video/mp4' src='{$file->video_field->url}' /> <track kind='subtitles' src='{subtitles}' srclang='de' /> </video> "; } ?> <?php endif; ?> <div class="textwrapper"> <?= $item->body_second; ?> </div> </article> <? endforeach; ?> Link to comment Share on other sites More sharing options...
adrian Posted November 2 Author Share Posted November 2 At a quick glance, it feels like you are missing a level when getting the video. You need to get the video_field from the select_video, but instead you are getting video_field from $item. Does that sound right? Link to comment Share on other sites More sharing options...
neophron Posted November 2 Share Posted November 2 1 hour ago, adrian said: At a quick glance, it feels like you are missing a level when getting the video. You need to get the video_field from the select_video, but instead you are getting video_field from $item. Does that sound right? Hi Adrian, thanks for your suggestion. Yes, now I see what's missing. The logic must be: Select the page, check if there is a field video_field inside and render the content. And I think that this php-logic causes me headache 😕 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now