How to set blog as the default homepage?
Created 7 years ago by shadythgodI want to know how can I set my Blog page as the default homepage on my website? I am using PyroCMS v2.2.5 Community
Actually.. this file is loaded first so while this works fine it will not override the named part correctly. The resources/REF/routes.php
file is loaded last so that would be a good place to put this in order for it to actually OVERRIDE the named route that posts makes.
Then {{ url_route('anomaly.module.posts::posts.index') }}
will point home if you want it to (other wise leave that out).
@shadythgod oops.. you're using v2.2 sorry man totally missed that! I don't know that you can. \(ツ)/¯
A custom route probably still but will need to write your own controller / view.
Easily that is lol. @shadythgod My advice is to make a view for the homepage just like blog homepage feeding in the blog data natively by looping over posts.
If this is a new development, come aboard v3 😄
@carsonsuite , i would like to move to v3 but i cant find any proper documentation on upgrading; can you link me to one?
First thing you will want to do is make sure you don't have a home page in pages. Toggle that off.
Next just route the posts index. One way to do this would be in your
routes/web.php
file that Laravel loads:Note that the named part (the
as
value) is included. This will make sure any routes referred to by the same name will also point here.