I want to take the url of the page and insert it inside a specific twig element, like this:
TWIG
<a href="{{ url }}"></a>
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 |
|---|---|---|---|---|
| 1 | 268 | 3 weeks ago | ||
| 0 | 196 | 3 weeks ago | ||
| 2 | 331 | 3 weeks ago | ||
| 1 | 253 | 3 weeks ago | ||
| 0 | 225 | 3 weeks ago |