Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Is there a way to check homepage type?
AjansKartal
New
I couldn't find a way to check the homepage type.
Does anyone know?
For example, I get the discussion layout with this query:Gdn::Config('Vanilla.Discussions.Layout');
0
Best Answer
-
R_J Admin
You can see that configuration also in the routes in the dashboard, and it is called the DefaultController.
So when you look at the config.php you will find:
$Configuration['Routes']['DefaultController'] = array('discussions', 'Internal');
Therefore something like
$homepage = array_shift(c('Routes.DefaultController'));
should be what you are looking for.6
Answers
You can see that configuration also in the routes in the dashboard, and it is called the DefaultController.
So when you look at the config.php you will find:
$Configuration['Routes']['DefaultController'] = array('discussions', 'Internal');
Therefore something like
$homepage = array_shift(c('Routes.DefaultController'));
should be what you are looking for.