# Can you use an attribute in another attribute's expression?

**URL:** <https://forum.pinegrow.com/t/can-you-use-an-attribute-in-another-attributes-expression/7242>\
**Category:** Questions\
**Tags:** blocks\
**Created:** [November 21, 2022, 10:01pm UTC](https://forum.pinegrow.com/t/can-you-use-an-attribute-in-another-attributes-expression/7242 "2022-11-21T22:01:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonroc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jonroc/32/2805_2.png) [@jonroc](https://forum.pinegrow.com/u/jonroc)\
**Post date:** [November 21, 2022, 10:01pm UTC](https://forum.pinegrow.com/t/can-you-use-an-attribute-in-another-attributes-expression/7242/1 "2022-11-21T22:01:04Z")

</div>

I have this setup for a lightbox to open on click of a \< a \> tag:

`<a>` tag with these attributes:

1. **ID** : lrg\_img, **Use As** : Image, **Control Type** : None (Use with Expressions)
2. **ID** : link\_img, **Use As** : Attribute, **Element attribute** :href, **Control Type** :None (Use with Expressions), **Expression** : {{lrg\_img}}

I’m expecting the href to be set to the URL of the image but it comes out blank. Is what I’m trying to do possible or is this another bug?

---

<div class="post-metadata">

**Author:** ![jonroc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jonroc/32/2805_2.png) [@jonroc](https://forum.pinegrow.com/u/jonroc)\
**Post date:** [November 21, 2022, 10:33pm UTC](https://forum.pinegrow.com/t/can-you-use-an-attribute-in-another-attributes-expression/7242/2 "2022-11-21T22:33:10Z")

</div>

I figured this out with a random guess. I made the expression: {{lrg\_img.url}}. It would be awesome if this information could be added to the Expression and Image sections of the [official documentation page](https://pinegrow.com/docs/wordpress/actions/block-attributes/).
