Add item actions elemnt

andersjo

Joined: 2006-09-04
Posts: 4
Posted: Wed, 2007-05-09 13:34

Hi.

I would like to add an extra element to the item actions dropdown list, but I can't understand how to do it.
Can someone please help me?

//andersjo

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-05-09 13:50

Edit:
gallery2/modules/core/templates/blocks/ItemLinks.tpl

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
andersjo

Joined: 2006-09-04
Posts: 4
Posted: Wed, 2007-05-09 14:07

Thanks.

I added this code:

{/foreach}
<option label="label" value="value">New item</option>
</select>

The new item appears in both album actions and item actions. I just want it to appear in the item actions list. Is this possible?

//andersjo

 
andersjo

Joined: 2006-09-04
Posts: 4
Posted: Wed, 2007-05-09 20:57

{if not $item.canContainChildren}<option label="label" value="value">New item</option>{/if}

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-05-09 21:16

{if !$item.canContainChildren}.....

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kevin360

Joined: 2003-09-06
Posts: 50
Posted: Fri, 2007-07-06 20:56

Can you provide a little more detail as to how to edit the file? Let's say I wanted to add in a Rotate Image command to the item actions pulldown, where would I put the code? From looking at the tpl file, it's pulling data out of $theme.itemLinks to populate the pulldown menu. So I'm not sure what the code would actually look like to place the Rotate Image command in there.

Thanks

 
WEB11

Joined: 2007-07-10
Posts: 4
Posted: Tue, 2007-07-10 23:32

Can i use this to achieve what I describe on the post bellow?

http://gallery.menalto.com/node/66679

 
kevin360

Joined: 2003-09-06
Posts: 50
Posted: Wed, 2007-07-11 16:31

It probably would achieve what you are trying to do. If you could limit it so that it only showed the add item link. But figuring out how to add or remove items from the pulldown menu I haven't been able to figure out. I know that it's pulling in data from the $theme.itemLinks to decide what to populate the pulldown menu with, but haven't figured out how to change what's in the $theme.itemLinks.