Embedding videos, audios and blog entries etc

sekeri
sekeri
@ilker
6 years ago
334 posts
Hello,
I can display an Audio in Templete Code widget like
{jrCore_list module="jrAction" search1="action_item_id = 25" search2="action_module = jrAudio" limit="1"}

or a Youtube video

{jrCore_list module="jrAction" search1="action_item_id = 552" search2="action_module = jrYoutube" limit="1"}

What I like to do is embeding a video, audio or a blog entry without jrCore_list.

For example this works perfect in Template Code widget

    <div class="item">

        <div class="container">
            <div class="row">
                <div class="col3">
                    <div class="block_image">
						{jrCore_list module="jrAction" search1="action_item_id = 25" search2="action_module = jrAudio" limit="1"}

                    </div>
                </div>
 
                 <div class="col3">
                    <div class="block_image">
						{jrCore_list module="jrAction" search1="action_item_id = 552" search2="action_module = jrYoutube" limit="1"}


                    </div>
                </div>
                
                
                <div class="col3">
                    <div class="block_image">
						{jrCore_list module="jrAction" search1="action_item_id = 156" search2="action_module = jrYoutube" limit="1"}


                    </div>
                </div>
                
                <div class="col3">
                    <div class="block_image">
						{jrCore_list module="jrAction" search1="action_item_id = 1" search2="action_module = jrSoundcloud" limit="1"}


                    </div>
                </div>                
 
            </div>
        </div>

    </div>

Audio Player or Youtube widgets are working fine but I would like to add all of them in one widget. I hope my question is clear enough.

Thanks!
updated by @ilker: 01/17/19 05:26:59PM
sekeri
sekeri
@ilker
6 years ago
334 posts
Maybe I should create a separate template for each object type to be used in the widget?
douglas
@douglas
6 years ago
2,793 posts
Instead of different templates, you can use capture and literal tags to surround your template code in the Template Code widget... ie.

[capture name="audio_list_template" assign="audio_list_template"}
    {literal}
        Template code goes here...
    {/literal}
{/capture}
{jrCore_list module="jrAction" search1="action_item_id = 25" search2="action_module = jrAudio" limit="1" template=$audio_list_template}

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
paul
@paul
6 years ago
4,330 posts
The jrCore_list is the main way of getting item data in Jamroom templates, so that is the best way to do it. In this instance though you could get all three Action items in one jrCore_list call, but you would first need to assertain the _item_id of each action item. If they were x, y and z the single call would be -

{jrCore_list module="jrAction" search="_item_id IN x, y, z"}

Then in the list template you'd need to loop round the $_items array to show all three.
This would be a more effecient way of doing it.

Hope that helps


--
Paul Asher - JR Developer and System Import Specialist
sekeri
sekeri
@ilker
6 years ago
334 posts
Thank you for your answers but I think my request is even simpler. I just want to place one or two specific videos into Template Code widget just the way you do with Video Player widget. The only problem about Video player is that it lets me to place only one video. I can use the Item List widget but the existing templates in Item List widget does not fit my requirements.
michael
@michael
6 years ago
7,744 posts
The playlist module allows for you to make lists of videos:
https://www.jamroom.net/the-jamroom-network/networkmarket/56/playlists

could you make your lists as playlists, then embed the playlist player?

Tags