Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add title tag to the link #25

Closed
janhendrickx opened this issue Jul 11, 2018 · 4 comments
Closed

Add title tag to the link #25

janhendrickx opened this issue Jul 11, 2018 · 4 comments

Comments

@janhendrickx
Copy link

Can it be made possible that the rendered tag gets a title object too? Would come in handy for SEO's sake :-)

@sebastian-lenz
Copy link
Owner

sebastian-lenz commented Jul 16, 2018

Hm, you mean in getElement()? Would be easy but we don't have no additional data to put into there so it would just repeat the displayed content of the link?

@glitchedmob
Copy link

I would imagine something similar to how link text is handled. Just have a checkbox to allow custom title text and add an extra input for it.

This would be a super helpful feature. I'm currently having to add extra fields for this manually, but being able to do it all in one would be awesome.

@glitchedmob
Copy link

We could probably take this a step further and allow for custom aria labels.

@janhendrickx
Copy link
Author

Sorry for my late reply, but I've been on vacation for a while :-)
@glitchedmob is correct; It would be helpful to be able to put all variables in one piece of code, and not having to add it all manually. The title should be required in the output, but there's always something there - the file name, the url, the title of the entry,... Or the user can override it in the field itself.
It would be super awesome if "I" could just output it all in one line of code like so:

{{ entry.linkField.getLink({ class: 'button w-button' }) }}

and that line of code would generate

<a class="button w-button" href="{{ item.myLinkField.getUrl() }}" title="{{ item.myLinkField.getCustomText() }} - or {{ item.myLinkField.getUrl() }} - or ... (default can be the url of filename)" target="{{ item.myLinkField.getTarget() }}">{{ item.myLinkField.getCustomText() }}</a>

All these fields can be filled in with the chosen link, the title can be the username, filename, category, username, entry title,... You catch my drift :-). If all these options can be automatically filled in it would make the developer's work a whole lot easier: just add the class for the styling, and all is well :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants