Return a tag from an action-itemref control

Is there an easy way to return the tag reference for an item selected in an action-itemref control?

Currently I’m looping through the tag tree looking for a matching ID which seems to be a bit like overkill and only works with layered items.
Thanks,
Tim.s

FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Tim,

itemrefs return instances of FWItem, so you can get the tag type at publish time using the same method as you would on the item the action is applied to.

I have some that will do this that I can send (or post on the wiki) if you like. It will return a div, table cell, paragraph, or the insertion point inside a sliced graphic effect item if graphic effects are applied to the item.

Joe

On 10 Oct 2012, at 14:29, Tim Plumb email@hidden wrote:

Is there an easy way to return the tag reference for an item selected in an action-itemref control?

Currently I’m looping through the tag tree looking for a matching ID which seems to be a bit like overkill and only works with layered items.
Thanks,
Tim.s

FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 11 Oct 2012, at 07:11, Joe Billings email@hidden wrote:

I have some that will do this that I can send

That should of course read: I have some code that will do this…

Joe


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Joe,
Thanks for this. I thought I checked this yesterday but trying it now it works perfectly. I can now do away with over twenty lines of redundant code that were simply looking for the item selected in the item-ref!
Thanks,
Tim.

On 11 Oct 2012, at 07:11, Joe Billings wrote:

itemrefs return instances of FWItem, so you can get the tag type at publish time using the same method as you would on the item the action is applied to.


FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options