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 · 930 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 Marcel, 5 days ago
0 84 5 days ago
Support · by JakobDB, 6 days ago
1 91 6 days ago
Support · by ramenos, 7 days ago
3 103 6 days ago
Support · by gravinator, 2 weeks ago
3 229 7 days ago
Support · by Roger Parkinson, 2 weeks ago
3 308 2 weeks ago