Skip to content

[bug] linkItField.linkAttributes exists in the documentation, but not in the code #104

@tomdavies

Description

@tomdavies

The readme file refers to it being possible to access a linkAttributes property:

 {{ entry.linkItField.linkAttributes }}

but that doesn't actually work:

Twig Runtime Error – [Twig\Error\RuntimeError](http://twig.sensiolabs.org/api/2.x/Twig/Error/RuntimeError.html)
Calling unknown method: presseddigital\linkit\models\Entry::linkAttributes()

Being able to access all the generated link attributes (inc href) would be super useful for when you need to build the inner HTML of a link manually, but still want to access attrs like target etc etc. Verb Navigation does this well.

Feels like this would be pretty easy to add - happy to PR if it's likely to be accepted

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions