# Using page builder slot inside of styled img tag

**URL:** <https://forum.mautic.org/t/using-page-builder-slot-inside-of-styled-img-tag/5728>\
**Category:** Product Support\
**Created:** [March 9, 2016, 9:33pm UTC](https://forum.mautic.org/t/using-page-builder-slot-inside-of-styled-img-tag/5728 "2016-03-09T21:33:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lwdeddie](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lwdeddie/32/755_2.png) [@lwdeddie](https://forum.mautic.org/u/lwdeddie)\
**Post date:** [March 9, 2016, 9:33pm UTC](https://forum.mautic.org/t/using-page-builder-slot-inside-of-styled-img-tag/5728/1 "2016-03-09T21:33:23Z")

</div>

I’m in the process of configuring the email builder to create emails using my own email template layout. Everything seems straightforward however I’m having difficulty adding the ‘slot’ code to the src="" portion of an

Code:

 ![]()

tag that contains required in-line styles. The in-line styles are necessary so the template displays properly. I'm trying to do this properly:  

Code:

 ![img]()

  
where the image src is the slot code. What is the proper way to do this?

---

<div class="post-metadata">

**Author:** ![lwdeddie](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lwdeddie/32/755_2.png) [@lwdeddie](https://forum.mautic.org/u/lwdeddie)\
**Post date:** [March 9, 2016, 9:33pm UTC](https://forum.mautic.org/t/using-page-builder-slot-inside-of-styled-img-tag/5728/2 "2016-03-09T21:33:23Z")

</div>

I’m in the process of configuring the email builder to create emails using my own email template layout. Everything seems straightforward however I’m having difficulty adding the ‘slot’ code to the src="" portion of an `<img>` tag that contains required in-line styles. The in-line styles are necessary so the template displays properly. I’m trying to do this properly:

```auto
<img style="display:block; line-height:0px; font-size:0px; border:0px;" class="img1" src="<?php $view['slots']->output('item-image-1'); ?>" alt="img" width="287" height="180" />
```

where the image src is the slot code. What is the proper way to do this?

---

<div class="post-metadata">

**Author:** ![lwdeddie](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lwdeddie/32/755_2.png) [@lwdeddie](https://forum.mautic.org/u/lwdeddie)\
**Post date:** [March 10, 2016, 3:47pm UTC](https://forum.mautic.org/t/using-page-builder-slot-inside-of-styled-img-tag/5728/3 "2016-03-10T15:47:08Z")

</div>

Sorry to say this doesn’t work. The Mautic preview shows all post-ceding closing code tags as text wherever this php is inserted. That’s the issue I am having, the system is not processing the entire php tag. Attached a screenshot of the output.

Code-wise there is something I’m missing. I’m hoping its just my syntax.

![](http://liquidwebdesigns.com/marketing/mautic-error.jpg)

---

<div class="post-metadata">

**Author:** ![lwdeddie](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lwdeddie/32/755_2.png) [@lwdeddie](https://forum.mautic.org/u/lwdeddie)\
**Post date:** [March 10, 2016, 5:01pm UTC](https://forum.mautic.org/t/using-page-builder-slot-inside-of-styled-img-tag/5728/4 "2016-03-10T17:01:59Z")

</div>

Actually I’m not expecting it support image type but to simply record text which would be a full URL. I want to place a full URL path (text) in the text slot. You’re saying this is not possible?

You can add an image to a text slot using the builder. What is the syntax or language Mautic uses to do this?
