Skip to content

Bug: link prefix/suffix not used in table-view #338

@giovanniborella

Description

@giovanniborella

When querying data, and displaying in the sidebar - the links behave differently. The user should not have to resort to a template to make sure the behavior is as expected.

Image

Pop-up vindue: http://www.dr.dk/
Sidebar link: https://mapgovidi.geopartner.dk/app/kursus/edit_bruger/www.dr.dk

I suspect the error lies in the difference in logic here:

layerClone[n] = "<a style='text-decoration: underline' target='_blank' rel='noopener' href='" + layerClone[n] + "'>" + (typeof k.link === "string" ? k.link : "Link") + "</a>";

Where the prefix and suffix is omitted. It is, however, not clear to me how to add the rest of the meta-description for the feature in this implementation - and i have most likely made is harder here #328. That PR also handles some missing logic in the table.

and here:

value = "<a target='_blank' rel='noopener' href='" + (property.value.linkprefix ? property.value.linkprefix : "") + feature.properties[property.key] + (property.value.linksuffix ? property.value.linksuffix : "") + "'>Link</a>";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions