I want to take the url of the page and insert it inside a specific twig element, like this:
<a href="{{ url }}"></a>
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
I want to take the url of the page and insert it inside a specific twig element, like this:
<a href="{{ url }}"></a>
Hi @lucapu88, I think page.url might be what you are looking for?
Let me know.
Paul
Hello @paulhibbitts! thanks for replying, but unfortunately page.url gives me the url of the page where I write. I wish I could insert any url in the .md file, then a user writes https://www.url.it and then I can call it in a <a> tag wherever I want in the .twig file,
Ah, sorry I do not know how to do that.
https://learn.getgrav.org/16/forms/blueprints/example-page-blueprint
You can add an extra text field in the page blueprint then call it from twig.
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 85 | 13 hours ago | ||
| 1 | 60 | 17 hours ago | ||
| 0 | 47 | 1 day ago | ||
| 6 | 350 | 5 days ago | ||
| 3 | 44 | 5 days ago |