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

Using ${navigation_root_url} or ${portal_url} in Link type does not work #6624

Open
yurj opened this issue Dec 20, 2024 · 5 comments
Open

Using ${navigation_root_url} or ${portal_url} in Link type does not work #6624

yurj opened this issue Dec 20, 2024 · 5 comments

Comments

@yurj
Copy link
Contributor

yurj commented Dec 20, 2024

How to reproduce:

  • go to demo.plone.org
  • login as admin
  • add a Link
  • insert ${navigation_root_url} as the help suggests
  • the link is rendered as http://${navigation_root_url} and not as https://demo.plone.org/
@davisagli davisagli transferred this issue from plone/plone.volto Jan 28, 2025
Copy link

boring-cyborg bot commented Jan 28, 2025

Thanks for opening your first issue here! Your engagement is essential for open source projects, including Plone. 🤗

If you haven't done so already, read Plone's Code of Conduct. Also please follow the issue template, as it helps both you and other community members contribute more effectively.

If your issue is a feature request, others may raise its prominence through feature voting.

Welcome to the Plone community! 🎉

@yurj
Copy link
Contributor Author

yurj commented Jan 28, 2025

Consider also this issue: plone/plone.app.contenttypes#712. z3c.form is not used by Volto so not an issue here but the serialization should be ok (the Link containing ${navigation_root_url} or ${portal_url} is converted in REST API: plone/plone.app.contenttypes#711).

@stevepiercy
Copy link
Collaborator

@yurj, after you closed that other issue plone/plone.volto#176, I looked again and realized that this might be also a UX issue. I made the same mistake, reading the help text instead of looking at the icon that looks like an electrical diagram for internal links.

Image

It has aria-label="openUrlBrowser" on the button, but there's no tooltip. It should have one.

I'd also suggest improving the help text, as this feature does not seem to support templating.

If you agree, then we can add sub-issues to this issue.

@yurj
Copy link
Contributor Author

yurj commented Jan 28, 2025

As you prefer, but overdocumenting issues can scare people. I mean, a problem is fixed when someone needs it to be fixed. I think the icon is OK because it is the one Volto uses to pick up items in Slate. I just was not used to it.

I would change the help text and remove any reference to the template feature. IMHO, in the future, when someone will need it to work because of some project special needs, it will be implemented in the UI.

@davisagli
Copy link
Member

I would change the help text and remove any reference to the template feature. IMHO, in the future, when someone will need it to work because of some project special needs, it will be implemented in the UI.

It's a bit complicated because the help text comes from the schema from the backend, and the templating feature does work in Classic UI afaik.

We can't simply replace the variables in the REST API, because then the replacements will also be seen when editing the link. So I think this probably needs to be handled in Volto in the LinkView (which is why I moved the issue here).

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