dadi / publish

Publish provides beautiful editorial interfaces for the management of content within API
https://dadi.cloud/en/publish
64 stars 13 forks source link

Link attribute no longer rendering #832

Open mingard opened 4 years ago

mingard commented 4 years ago

Previous versions of Publish supported the publish.display.link attribute, which accepted a pattern that contained {value} such as https://somedomain.com/path/to/{value} which would use the value of the field to replace the placeholder.

https://github.com/dadi/publish/blob/1bffba508142f5b18695a677b85708dcd1ea7825/app/components/FieldString/FieldStringEdit.jsx#L230-L231

https://github.com/dadi/publish/blob/c0b1dd3eb68b2bd54b1791ac27b2c5a9f0093187/app/lib/util/formatLink.js#L1-L11

The formatLink seems to be returning only the value of the field where previously it would render.

jimlambie commented 4 years ago

@mingard interestingly it still works on the list view

https://github.com/dadi/publish/blob/1bffba508142f5b18695a677b85708dcd1ea7825/app/components/FieldString/FieldStringList.jsx#L116-L120