item_action.tpl

nate
@nate
11 years ago
917 posts
I have a client that wants to show 2 seperate action feeds. One feed will be all thumbnails.

Can I have a second item_action.tpl on my song module?
updated by @nate: 03/11/14 03:14:15AM
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Try template="my_custom_item_action.tpl" in your list function with the template in the active skin dir.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nate
@nate
11 years ago
917 posts
Yeah but I wanna get the $item_action_data and that pulls the item_action.tpl from my song module. I want to change that template.
updated by @nate: 02/06/14 02:08:46PM
nate
@nate
11 years ago
917 posts
I would even settle for just getting the $item.action_data._item_id
brian
@brian
11 years ago
10,149 posts
Natedogg265:
I would even settle for just getting the $item.action_data._item_id

If you do a jrCore_list on the jrAction module, then you will get the action_data array.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
I tried. I'll give it another shot.
nate
@nate
11 years ago
917 posts
Can I do it like this?

{assign var="item_id" value=$item.action_data._item_id}
brian
@brian
11 years ago
10,149 posts
Natedogg265:
Can I do it like this?

{assign var="item_id" value=$item.action_data._item_id}

Why do you need to assign it? I'm not clear on what you're trying to do...

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
I was trying to get the image so I am doing something like this.

{if $item.action_module == "xtSong" || $item.action_module == "xtStem" || $item.action_module == "xtMix" }
  {assign var="item_id" value=$item.action_data._item_id}
  {assign var="image_type" value="audio_image"}
{else}
  {assign var="item_id" value=$item._profile_id}
  {assign var="image_type" value="profile_image"}
{/if}

{jrCore_module_function function="jrImage_display" module="jrProfile" type=$image_type item_id=$item_id size="xlarge" alt=$item.event_title crop="auto" height=384 width=384 class="img_scale" crop="auto"}

updated by @nate: 02/06/14 03:50:46PM
brian
@brian
11 years ago
10,149 posts
That should work - is it not working?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
No it isn't.

Quote: jrImage_display: image item_id parameter required
brian
@brian
11 years ago
10,149 posts
Try using:

{$item.action_item_id}

instead.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
I'm getting images but not the right ones. I actually checked the action_item_id value earlier and it isn't the same as the action_data._item_id value. At least not in all cases.
brian
@brian
11 years ago
10,149 posts
$action_item_id is the correct ID to use - it is set to the id of the item being created/updated inside jrAction_save(). Double check in your module that you are using the correct ID when calling jrAction_save.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
Will do.

Tags