jr seamless templates

alt=
MONEE
@monee
10 years ago
36 posts
I'm trying list all my videos and youtube videos together but I don't want to use the item_list.tpl. I want to use a costume template so I can list them in grid without changing the list template. How can I do this? I see how to assign template but how do I create the videos and youtube rows in same template. I remember you could do it in jr4 with if statement. how to do in jr5?
updated by @monee: 03/04/14 05:31:03PM
paul
@paul
10 years ago
4,326 posts
Each item that the jrSeamless module returns has the variable 'seamless_module_name' which will be 'jrVideo', 'jrYouTube', or whatever, so you can test for that in your template -
{if isset($_items)}
    {foreach from=$_items item="item"}
        {if $item.seamless_module_name == 'jrVideo'}
            Do the Video thing
        {elseif $item.seamless_module_name == 'jrYouTube'}
            Do the YouTube thing
        {/if}
    {/foreach}
{/if}

(Start by sticking a {debug} into the template just to make sure I have the variable name right)
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist
michael
@michael
10 years ago
7,713 posts
heres the docs for {debug} if your unfamiliar with it:

"{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug