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.
How can I get the session state in the master view?
Q1, Is there and variables list that can be accessed in master view? I want to know whether the visitor logined or not.
Q2, It seems that if I want to customize the assets (like menu) show the page, I have to modify the source code but not in the view, right?
Q2, It seems that if I want to customize the assets (like menu) show the page, I have to modify the source code but not in the view, right?
0
Comments
$Session = Gdn::Session(); if ($Session->IsValid()) { // do something
A2. You can modify the source code by copying the views that you want to change into your custom theme folder and editing them there. There is more documentation on it here: http://vanillaforums.org/page/ThemeQuickStart