Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.
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