0

I want to create a link to an email address like <a href="mailto:somebody@provider.com">somebody</a>.

I tried to use a weblink resource (which gets an id of 20) with mailto:person1@provider.nl as link value and render this in my content with the tag [[~20?~]]. (and different variations of it)

But ModX renders it as <a href="index.php?id=20">somebody</a> This is not what I want.

So how do I do this properly, so that I can reuse this resource in several places in the website?

This link needs to be editable for a 'Content editor' with reduced rights, so I don't think a chunk is the best way to go.

Esger
  • 1,310
  • 12
  • 18

1 Answers1

1

Because to do this you need to create weblink:

enter image description here

enter image description here

and this is works as expected in Wayfinder/PdoMenu:

enter image description here

UPDATE: [[~20]] - will output alias field. You need to output content field. To do this use pdoField snippet (part of pdoTools):

[[pdoField?&id=`20`&field=`content`]]
Vasis
  • 2,281
  • 1
  • 16
  • 23
  • This is exactly what I did, but I'm not using WayFinder nor PdoMenu to pull in the resource. I have another Page resource that should be able to use the Weblink resource like this: TinyMce has a link button which shows a dialog to form the link. In the search field under the General tab you can enter the name of the Weblink resource. If found it puts [[~20]] in the Link URL field. In the actual webpage this renders as index.php?id=20 in the href attribute of my link. I would have expected the 'mailto:somebody@provider.nl' though. – Esger Oct 24 '16 at 08:24