Pulling item name into variable/field?
October 25, 2016 12:00 AM
Is there a way to pull the name of an item (for example, a button) into either a variable or into an actual text field? I'm not talking about the HTML Name of the object - I'm talking about the name of the item that is shown on the left in the Title Explorer.
undefined
Thanks!
Discussion (4)
You can use Lectoras Token Replacement, by adding two actions to the object:
On: Page show
Action: Modify variable
Target: myAltTag
Type: Set as empty
On: Page show
Action: Run javascript
Javascript:
VarmyAltTag.set(%HTMLNAME%.altName);
Mind you have to publish. Preview is always without alt tags.
What about a way to pull the ALT tag into a variable?
I think, the only place where this name can be get from after publication is the ALT tag. If you publish with "Create ALT tags for images and buttons" unchecked, I don't think there's a way to retrieve it dynamically. If you have ALT tags it's easy, but probably only available for images or buttons, i.e. objects with alternative text.
Discussions have been disabled for this post