Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Get the url from grav page

Started by Luca Caputo 6 years ago · 4 replies · 1703 views
6 years ago

Schermata da 2020-07-27 14-18-21|690x388

I want to take the url of the page and insert it inside a specific twig element, like this:

TWIG
     <a href="{{ url }}"></a>
6 years ago

Hi @lucapu88, I think page.url might be what you are looking for?

Let me know.
Paul

6 years ago

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,

last edited 07/28/20 by Luca Caputo

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 1 week ago
4 185 2 days ago
General · by lynbor, 6 days ago
2 128 3 days ago
General · by Old Man Umby, 1 week ago
1 103 1 week ago
General · by Sebastian, 2 weeks ago
1 127 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 251 3 weeks ago