Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Home_url with anchor at the end

Started by Matt 9 years ago · 2 replies · 986 views
9 years ago

I'm using home_url variable to redirect users to my home page. But I want to redirect it to specific page. So, in normal html I can do something like this

mypage.com/#myanchor

How to do it with grav?
{{home_url}}/#anchor
dont work for me. Please, can anyone help me with that?

last edited 01/15/18 by Matt
9 years ago

Hi
What sort of link are you getting with home_url? I've got something like this using base_url working just fine on my policies page so I'd think the same idea would work on the homepage.

<a href="{{ base_url }}/policies#_cookie">Cookie Policy</a>

Suggested topics

Topic Participants Replies Views Activity
Support · by gravinator, 1 month ago
5 452 1 hour ago
Support · by stell, 7 days ago
4 238 5 days ago
Support · by Gravver, 2 weeks ago
6 279 1 week ago
Support · by Marcel, 4 weeks ago
2 338 1 week ago
Support · by blu3prince, 2 weeks ago
1 254 2 weeks ago