# CMS Image - How to set target

**URL:** <https://forums.realmacsoftware.com/t/cms-image-how-to-set-target/50841>\
**Category:** Elements\
**Created:** [September 7, 2025, 8:20am UTC](https://forums.realmacsoftware.com/t/cms-image-how-to-set-target/50841 "2025-09-07T08:20:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [September 7, 2025, 8:20am UTC](https://forums.realmacsoftware.com/t/cms-image-how-to-set-target/50841/1 "2025-09-07T08:20:38Z")

</div>

```auto
---
title: "Herr Grau zieht um"
date: "2025-08-24"
tags: [CORNROW, D-Wurf, Herr Grau, Loki]
categories: []
author: Ulrich
image:
    src: /d-wurf/cornrow_d-wurf_herr_grau_zieht_aus.jpg
    alt: CORNROW D-Wurf Herr Grau zieht aus
imagelink: /artikel/?item=herr_grau_zieht_um
imagelinktarget: _self
imagelinktitle:
---

```

This is the header of a CMS article.

How should i set the _link_, _target_ and the _title_? if i add _target_ to the _Custom Attributes_ i get an error message: _Illegal Key_

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/c/8/c8a55d61b58cada24c321d0b71f00c67bc0d36dd.png)

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [September 9, 2025, 7:56am UTC](https://forums.realmacsoftware.com/t/cms-image-how-to-set-target/50841/2 "2025-09-09T07:56:31Z")

</div>

You’ve caught a bit of an edge case issue here.

The problem is that Elements writes to the `target` attribute via the “Open in New Window” checkbox. So `target` is a reserved attribute that you can’t manually set.

We’d have to update Elements to allow you to set a custom target attribute — I’ll add a ticket for us to investigate this, however, I can’t say when we’ll be able to get to this one.

---

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [September 9, 2025, 9:24am UTC](https://forums.realmacsoftware.com/t/cms-image-how-to-set-target/50841/3 "2025-09-09T09:24:26Z")

</div>

Thanks @ben

This would be important. Because sometimes you have an image link in the CMS that points to its own page (\_self), and sometimes it’s an external link (\_blank).

Perhaps the solution would be to specify “target” in the list of options, so that it takes priority and the clickable option isn’t used?

My whish:

```auto
---
title: "Herr Grau zieht um"
date: "2025-08-24"
tags: [CORNROW, D-Wurf, Herr Grau, Loki]
categories: []
author: Ulrich
image:
    src: /d-wurf/cornrow_d-wurf_herr_grau_zieht_aus.jpg
    alt: CORNROW D-Wurf Herr Grau zieht aus
    link: /artikel/?item=herr_grau_zieht_um
    target: _self
    title: Linktitle
---

```
