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

Change text to mailto #496

Open
bisd opened this issue Oct 26, 2023 · 6 comments
Open

Change text to mailto #496

bisd opened this issue Oct 26, 2023 · 6 comments
Assignees

Comments

@bisd
Copy link
Member

bisd commented Oct 26, 2023

The enquiries email address on this page is text rather than a link - I am assuming it should be a mailto?

https://demo.localgovdrupal.org/national-parks-uk/loch-lomond-and-trossachs

I wasn't able to establish which repo this issue belongs to - maybe someone could help? Thank you.

@msayoung

@markconroy
Copy link
Member

Hi @bisd

There is currently no template for that item. It was set up originally as a text field instead of an email field for some reason.

If you want to turn it into an email field, you could duplicate the field.html.twig file and call it field--node--localgov-directory-email--localgov-directories-venue.html.twig then edit that file to make it an email link.

Note however, that that might break existing sites if they have already set an email link for this field in the node template or somewhere else (this is only a might, we'd have to test to see).

@bisd
Copy link
Member Author

bisd commented Feb 11, 2024

Thanks @markconroy. Sorry but I am not sure what you meant by it not being an email field since it seems to be an email field (please see attachment below). I have created a twig template with the suggested naming convention. I am not sure what the best way is of testing it is before it is merged but I have submitted it as a pull request anyway. Please let me know if there is anything I can do to help with the testing.

enquiries_email

@bisd bisd self-assigned this Feb 11, 2024
@ekes
Copy link
Member

ekes commented Feb 13, 2024

As it's a email field the formatter could be changed.

image

image

@ekes
Copy link
Member

ekes commented Feb 14, 2024

So it's the default set in LocalGov Directories in this line

https://github.com/localgovdrupal/localgov_directories/blob/f871834f2e2a60e10d5b2a2ba6a49db889a7d7c6/modules/localgov_directories_venue/config/install/core.entity_view_display.node.localgov_directories_venue.default.yml#L74

Exporting config after changing the setting from plain text to email and looking at the exported config you can see what the line should become to set it to email by default. That way is maybe easiest to make a PR against localgov_directories to change the default.

@bisd
Copy link
Member Author

bisd commented Feb 15, 2024

I have made a new pull request against localgov_directories to change the field formatter default here.

@markconroy
Copy link
Member

Sorry, my mistake. I thought it was a text field we had here since it's format was 'plain text'.

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

No branches or pull requests

3 participants