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 · 1693 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, 4 days ago
3 92 1 hour ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago