Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Landing Page Redirection

Started by Laura Thomas 9 years ago · 4 replies · 2077 views
9 years ago

Hey there,

Fairly new to GRAV and loving it so far. This may seem like a stupid question, but how do I go about setting up a landing page? - I have the page twig, but how do I redirect my domain to said landing page within GRAV and then load the base theme styling when entering the site?

Thanks everyone 🙂

9 years ago

HI!

I'm not sure I understand your question. Do you want to set a homepage for your site?

9 years ago

Hi! Sorry if I wasn't clear enough.

I have my main site and I have a landing page. I want to have my landing page the first page a user will come to and then be able to click through to the main site.

How do I do this within twig?

Thanks :)

9 years ago

If I understand your need, you can set your site home page in the system configuration to any page you like.

Set:

home: alias: /pathToCustomLandingPage

The system config file is located here:
user/config/system.yaml

If you have the admin plugin you can also select/set any page in your site from the dropdown menu to be your home page, as illustrated here:

https://learn.getgrav.org/admin-panel/dashboard/configuration-system

Suggested topics

Topic Participants Replies Views Activity
General · by lynbor, 1 month ago
5 538 5 days ago
General · by Andy Miller, 2 weeks ago
0 226 2 weeks ago
General · by lynbor, 4 weeks ago
7 655 3 weeks ago
General · by Harry, 3 weeks ago
0 232 3 weeks ago
General · by Old Man Umby, 1 month ago
2 366 1 month ago