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

Home_url with anchor at the end

Started by Matt 9 years ago · 2 replies · 938 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 complanar, 6 days ago
6 139 15 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 51 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago